Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] [SSH] i klucze.
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish)
View previous topic :: View next topic  
Author Message
BeteNoire
Veteran
Veteran


Joined: 25 Sep 2005
Posts: 1827

PostPosted: Fri Nov 24, 2006 9:12 pm    Post subject: [SOLVED] [SSH] i klucze. Reply with quote

Na jednym kompie postawiłem SSH uwierzytelniane kluczami. Na drugim usiłuję zrobić to samo z takim samym konfigiem po stronie tak klienta jak i serwera ale demon wciąż chce ode mnie hasła.
ssh -v wypluwa coś takiego:
Code:
ssh -v dexter@auvi
OpenSSH_4.5p1, OpenSSL 0.9.8d 28 Sep 2006
debug1: Reading configuration data /home/dexter/.ssh/config
debug1: Applying options for auvi
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: auto-mux: Trying existing master
debug1: Control socket "/home/dexter/.ssh/socket-dexter@auvi:21096" does not exist
debug1: Connecting to auvi [10.0.0.3] port 21096.
debug1: Connection established.
debug1: identity file /home/dexter/.ssh/id_rsa type 1
debug1: identity file /home/dexter/.ssh/id_dsa type 2
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.5
debug1: match: OpenSSH_4.5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.5
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '[auvi]:21096' is known and matches the RSA host key.
debug1: Found key in /home/dexter/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key: /home/dexter/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Offering public key: /home/dexter/.ssh/id_dsa
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: password
dexter@auvi's password:                       

W sshd_config odkomentowane i zmienione są tylko:
Code:
Port 21096
Protocol 2
ListenAddress 10.0.0.3
PermitRootLogin no
AllowUsers dexter

W konfiguracji uwierzytelniania opierałem się na dokumentacji Gentoo (tym trzyczęściowym artykule z "Zasoby dokumentacji") oraz małym howto z jakilinux.org.
Oczywiście skopiowałem zawartość moje id_rsa_pub i id_dsa_pub do ~/.ssh/authorized_keys, próbowałem do authorized_keys2 ale nic nie dało.

Teraz pytanie: Dlaczego tak samo skonfigurowane uwierzytelnianie/sshd na jednym kompie działa a na drugim nie? Co przeoczyłem?
_________________
powered by power plant


Last edited by BeteNoire on Sat Nov 25, 2006 10:14 am; edited 1 time in total
Back to top
View user's profile Send private message
szolek
Guru
Guru


Joined: 30 Mar 2005
Posts: 570
Location: Brzóza Królewska

PostPosted: Fri Nov 24, 2006 11:19 pm    Post subject: Reply with quote

To jest mój konfig, na którym działa tylko autoryzacja po kluczu. Dojdziesz co i jak. ;)
Code:

Protocol 2
PubkeyAuthentication yes
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM yes
Subsystem       sftp    /usr/lib/misc/sftp-server

_________________
Zanim spróbujesz warto wiedzieć: to
Zapamiętaj tą stronę.
Nie zapominaj o tych radach.
Back to top
View user's profile Send private message
manwe_
Guru
Guru


Joined: 01 Feb 2006
Posts: 535
Location: Kraków/Cracow, Poland

PostPosted: Sat Nov 25, 2006 12:07 am    Post subject: Reply with quote

Pierwsze co mi przychodzi do głowy - sprawdź prawa dostępu do plików i katalogu .ssh, OpenSSH nie czyta/autoryzuje kluczy jeżeli prawa są za duże [600/700 jest najpewniejsze].
Back to top
View user's profile Send private message
Piecia
Guru
Guru


Joined: 12 Nov 2004
Posts: 447
Location: znienacka

PostPosted: Sat Nov 25, 2006 7:22 am    Post subject: Reply with quote

A apropo kluczy dlaczego nieraz nie można wysłać przez scp? Protokół nr 2 w pliku konfiguracyjnym.
Wysyłam jakiś plik przez scp, widzę że odświeżają się pliki ~/.bash* ale plik nie zostaje przesłany.

..::Milu Edit: ort!
Back to top
View user's profile Send private message
BeteNoire
Veteran
Veteran


Joined: 25 Sep 2005
Posts: 1827

PostPosted: Sat Nov 25, 2006 10:14 am    Post subject: Reply with quote

manwe_ wrote:
Pierwsze co mi przychodzi do głowy - sprawdź prawa dostępu do plików i katalogu .ssh, OpenSSH nie czyta/autoryzuje kluczy jeżeli prawa są za duże [600/700 jest najpewniejsze].

Prawa do tego co piszesz były dobre. Jednak OpenSSH jest na tyle mądry, że wykrył złe prawa do... /home/user (770), które nadałem kiedyś, żeby sobie coś ułatwić. Stosowny komunikat pojawiał się nawet w syslogu, ale go nie zauważyłem.
Co do ChallengeResponseAuthentication to czy zmienię na yes czy no - to nic nie zmienia. Manual na ten temat jest bardzo enigmatyczny ale może ma ta opcja jakiś związek z pam, którego w ogóle nie używam ;)
_________________
powered by power plant
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum