Tentando se conectar a um servidor SSH em uma máquina e funciona bem. Não do outro [fechado]

0
~$ ssh -v [email protected]
OpenSSH_6.9p1, LibreSSL 2.1.7
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: /etc/ssh/ssh_config line 25: Applying options for *
debug1: Connecting to 45.79.8.241 [45.79.8.241] port 22.
debug1: Connection established.
debug1: identity file /Users/raina/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/raina/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/raina/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/raina/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/raina/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/raina/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/raina/.ssh/id_ed25519 type -1
debug1: identity file /Users/raina/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/raina/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.9
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.1p1-hpn14v9
debug1: match: OpenSSH_7.1p1-hpn14v9 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 45.79.8.241:22 as 'raina'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client [email protected] <implicit> none
debug1: kex: client->server [email protected] <implicit> none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-ed25519 SHA256:LQ1K6AddhnCMm3KVYX46yS9RZFcM8szWf+tpuCgtb/E
debug1: Host '45.79.8.241' is known and matches the ED25519 host key.
debug1: Found key in /Users/raina/.ssh/known_hosts:1
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
debug1: Next authentication method: publickey
debug1: Offering RSA public key:
debug1: Server accepts key: pkalg ssh-rsa blen 535
debug1: Authentication succeeded (publickey).
Authenticated to 45.79.8.241 ([45.79.8.241]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8

Outra máquina:

$ ssh -v [email protected]
OpenSSH_7.1p1, OpenSSL 1.0.2d 9 Jul 2015
debug1: Connecting to 45.79.8.241 [45.79.8.241] port 22.
debug1: Connection established.
debug1: identity file /home/Administrator/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/Administrator/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/Administrator/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/Administrator/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/Administrator/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/Administrator/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/Administrator/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/Administrator/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.1p1-hpn14v9
debug1: match: OpenSSH_7.1p1-hpn14v9 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 45.79.8.241:22 as 'raina'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client [email protected] <implicit> none
debug1: kex: client->server [email protected] <implicit> none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-ed25519 SHA256:LQ1K6AddhnCMm3KVYX46yS9RZFcM8szWf+tpuCgtb/E
debug1: Host '45.79.8.241' is known and matches the ED25519 host key.
debug1: Found key in /home/Administrator/.ssh/known_hosts:1
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
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/Administrator/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Trying private key: /home/Administrator/.ssh/id_dsa
debug1: Trying private key: /home/Administrator/.ssh/id_ecdsa
debug1: Trying private key: /home/Administrator/.ssh/id_ed25519
debug1: No more authentication methods to try.
Permission denied (publickey).

O que dá? O mesmo id_rsa em ambos

    
por sobirds 07.11.2015 / 06:01

1 resposta

2

Eu descobri o problema. O OSX estava usando seu próprio keychain e não o do .ssh como um sistema BSD ou Linux normal.

Eu só precisava adicionar o arquivo id_rsa ao keychain e então recopiar.

A chave privada funcionou bem depois disso.

Obteve as informações daqui: link

    
por 07.11.2015 / 07:24

Tags