SSH:公開鍵認証を試みるときにシステムが秘密鍵を提供するのはなぜですか? [閉鎖]

SSH:公開鍵認証を試みるときにシステムが秘密鍵を提供するのはなぜですか? [閉鎖]

サーバーに接続しようとしています。そのサーバーにログインするための秘密鍵を受け取り、id_rsaに追加しましたが、クライアントはそれをid_rsa.pubの代わりに公開鍵に転送し続けます。 id_rsa.pubが私のssh_configファイルにないからですか?

サーバー接続の試み

debug1: Offering RSA public key: /root/.ssh/id_rsa
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51

SSH構成ファイル(IDセクション)

root@etoorlan4c:~/.ssh# cat /etc/ssh/ssh_config
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/identity
#   IdentityFile ~/.ssh/id_rsa

~/.ssh/の内容

root@etoorlan4c:~/.ssh# ls
authorized_keys  id_rsa  id_rsa.pub  known_hosts

ベストアンサー1

秘密鍵が無効です。 1文字がありません。有効な秘密鍵を使用すると、出力は次のように変更されます。

debug1: Offering RSA public key: root@etoorlan4c
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: sshkey.private
debug3: sign_and_send_pubkey: RSA SHA256:jmMyCOppv3KKkRgiHI4s5h3I7LwyCgms8uSG06KClQ4
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 52
debug1: Authentication succeeded (publickey).
Authenticated to [remoteHost]([xxx.xxx.xxx.xxx]:22).

おすすめ記事