Quando tento conectar-me a um determinado servidor (presente em ~/.ssh/known_hosts
) onde copiei minha chave pública, ele sempre pergunta minha senha. Se eu fechar a conexão e tentar novamente, ela usa a minha chave corretamente. Se eu tentar me conectar novamente depois de uma hora ou duas, ele perguntará minha senha novamente.
Primeira conexão:
aurelien ~ > ssh -v fac
OpenSSH_5.9p1, OpenSSL 1.0.0e 6 Sep 2011
debug1: Reading configuration data /home/aurelien/.ssh/config
debug1: /home/aurelien/.ssh/config line 27: Applying options for fac
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to zzzzzzzz.univ-lyon1.fr [a.b.c.d] port 22.
debug1: Connection established.
debug1: identity file /home/aurelien/.ssh/id_rsa type 1
debug1: identity file /home/aurelien/.ssh/id_rsa-cert type -1
debug1: identity file /home/aurelien/.ssh/id_dsa type -1
debug1: identity file /home/aurelien/.ssh/id_dsa-cert type -1
debug1: identity file /home/aurelien/.ssh/id_ecdsa type -1
debug1: identity file /home/aurelien/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5
debug1: match: OpenSSH_5.1p1 Debian-5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr 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: Server host key: RSA 49:bb:84:f5:0b:7c:e3:be:29:9d:7b:09:1b:a0:4e:f4
debug1: Host 'zzzzzzzz.univ-lyon1.fr' is known and matches the RSA host key.
debug1: Found key in /home/aurelien/.ssh/known_hosts:21
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/aurelien/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/aurelien/.ssh/id_dsa
debug1: Trying private key: /home/aurelien/.ssh/id_ecdsa
debug1: Next authentication method: password
[email protected]'s password:
debug1: Authentication succeeded (password).
Authenticated to zzzzzzzz.univ-lyon1.fr ([a.b.c.d]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
Last login: Fri Dec 16 20:53:27 2011 from xxxxxx.rev.numericable.fr
fac ~ $ logout
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype [email protected] reply 0
logout
logout
debug1: channel 0: free: client-session, nchannels 1
Connection to zzzzzzzz.univ-lyon1.fr closed.
Transferred: sent 2576, received 2216 bytes, in 13.5 seconds
Bytes per second: sent 190.8, received 164.1
debug1: Exit status 0
2ª conexão (logo após a primeira):
aurelien ~ > ssh -v fac
OpenSSH_5.9p1, OpenSSL 1.0.0e 6 Sep 2011
debug1: Reading configuration data /home/aurelien/.ssh/config
debug1: /home/aurelien/.ssh/config line 27: Applying options for fac
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to zzzzzzzz.univ-lyon1.fr [a.b.c.d] port 22.
debug1: Connection established.
debug1: identity file /home/aurelien/.ssh/id_rsa type 1
debug1: identity file /home/aurelien/.ssh/id_rsa-cert type -1
debug1: identity file /home/aurelien/.ssh/id_dsa type -1
debug1: identity file /home/aurelien/.ssh/id_dsa-cert type -1
debug1: identity file /home/aurelien/.ssh/id_ecdsa type -1
debug1: identity file /home/aurelien/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5
debug1: match: OpenSSH_5.1p1 Debian-5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr 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: Server host key: RSA 49:bb:84:f5:0b:7c:e3:be:29:9d:7b:09:1b:a0:4e:f4
debug1: Host 'zzzzzzzz.univ-lyon1.fr' is known and matches the RSA host key.
debug1: Found key in /home/aurelien/.ssh/known_hosts:21
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/aurelien/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
Authenticated to zzzzzzzz.univ-lyon1.fr ([a.b.c.d]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
Last login: Tue Dec 20 14:17:17 2011 from xxxxxx.rev.numericable.fr
fac ~ $ logout
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype [email protected] reply 0
-bash: /home/etu/a/yyyyyyy/.bash_logout: Permission denied
logout
debug1: channel 0: free: client-session, nchannels 1
Connection to zzzzzzzz.univ-lyon1.fr closed.
Transferred: sent 3360, received 2648 bytes, in 748.5 seconds
Bytes per second: sent 4.5, received 3.5
debug1: Exit status 0
Editar : minha chave privada não é criptografada (sem passphrase) e não tenho esse problema em outros servidores. Estou em uma caixa linux, com awesomewm e não estou usando nenhum agente (além do ssh-agent, eu acho?).