~$ 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
기타 기계:
$ 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).
무엇을 제공합니까? 둘 다의 id_rsa가 동일합니다.
답변1
나는 이것을 알아 냈습니다. OSX는 일반 BSD 또는 Linux 시스템처럼 .ssh의 키체인 대신 자체 키체인을 사용합니다.
id_rsa 파일을 키체인에 추가하고 다시 복사하면 됩니다.
그 후 개인 키가 제대로 작동했습니다.
여기에서 제공되는 정보: http://fplanque.com/dev/mac/secure-ssh-private-keys-on-mac-osx-10-5