원격 서버에 액세스하려고 합니다. 이것은 아래와 같은 내 SSH 명령입니다.
bitech@hdpedge01:~/.ssh$ ssh [email protected] -i ~/.ssh/id_rsa -v
권한 거부 오류가 발생합니다.
OpenSSH_6.0p1 Debian-4+deb7u6, OpenSSL 1.0.1t 3 May 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 151.252.41.105 [151.252.41.105] port 22.
debug1: Connection established.
debug1: identity file /home/bitech/.ssh/id_rsa type -1
debug1: identity file /home/bitech/.ssh/id_rsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.0p1 Debian-4+deb7u6
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: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: DSA 28:64:63:b2:91:98:78:db:f9:4f:b3:32:f1:a4:39:27
debug1: Host '151.252.41.105' is known and matches the DSA host key.
debug1: Found key in /home/bitech/.ssh/known_hosts:3
debug1: ssh_dss_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
debug1: Next authentication method: publickey
debug1: Trying private key: /home/bitech/.ssh/id_rsa
debug1: key_parse_private_pem: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
Enter passphrase for key '/home/bitech/.ssh/id_rsa':
debug1: key_parse_private_pem: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
Enter passphrase for key '/home/bitech/.ssh/id_rsa':
debug1: key_parse_private_pem: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
Enter passphrase for key '/home/bitech/.ssh/id_rsa':
debug1: key_parse_private_pem: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
debug1: No more authentication methods to try.
Permission denied (publickey).
이 오류를 디버깅하는 방법을 이해할 수 없습니다. ssh-keygen -f id_rsa -p
명령을 사용하여 비밀번호를 변경해 보았지만 항상 Bad 가 표시됩니다 passphrase error
.
답변1
이러한 오류는 열려고 하는 항목이 OpenSSH에서 읽을 수 있는 개인 키로 인식되지 않음을 나타냅니다.
debug1: Trying private key: /home/bitech/.ssh/id_rsa
debug1: key_parse_private_pem: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
Enter passphrase for key '/home/bitech/.ssh/id_rsa':
하나 있다알려진 오류, 이 문제는 다음 버전에서 수정될 예정입니다. 간단히 말해서 일부 OpenSSH 버전은 모든 오류를 "잘못된 비밀번호"로 표시하므로 사용자에게 매우 혼란스러울 수 있습니다.
당신의 열쇠는 어떻게 생겼나요? 그거 어디서 났어?