Raspbianでrsaキーを使用してログインできない

Raspbianでrsaキーを使用してログインできない

Raspbianシステムをインストールし、私の秘密鍵を使用してSSHを介してシステムに接続したいと思います。私は他のサーバーでもこのキーを使用しているので、chmodがローカルで正しく設定されていると確信しています。

Raspbianでsshを試してみると、次のことが起こります。

debug1: SSH2_MSG_NEWKEYS received
debug2: key: /home/nagyviktor/.ssh/id_rsa (0x55c3847112d0), agent
debug1: Skipping ssh-dss key /home/nagyviktor/.ssh/id_dsa - not in PubkeyAcceptedKeyTypes
debug2: key: /home/nagyviktor/.ssh/id_ecdsa ((nil))
debug2: key: /home/nagyviktor/.ssh/id_ed25519 ((nil))
debug3: send packet: type 5
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/nagyviktor/.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
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/nagyviktor/.ssh/id_ecdsa
debug3: no such identity: /home/nagyviktor/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /home/nagyviktor/.ssh/id_ed25519
debug3: no such identity: /home/nagyviktor/.ssh/id_ed25519: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password

rsaキーを受け入れるには、設定で何を変更する必要がありますか?

ベストアンサー1

鍵が拒否されました。これは、サーバー側で正しく設定されていないことを意味します。最も簡単なこと

ssh-copy-id user@raspberry-ip

設定を手動で確認するには、すべてのホームディレクトリ、ディレクトリ、および~/.ssh/そのauthorized_keys中のファイルの所有者と権限を確認してください。

おすすめ記事