SSHを使用してリモートサーバーに接続するときにエラーが発生しました。

SSHを使用してリモートサーバーに接続するときにエラーが発生しました。

リモートサーバーにアクセスしようとしています。これは以下のような私の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バージョンでは、すべてのエラーが「間違ったパスワード」として表示されるため、ユーザーにとって非常に混乱する可能性があります。

あなたの鍵はどのように見えますか?それはどこから出たの?

おすすめ記事