📘
SSHに失敗するときの挙動(Permission denied (publickey))
はじめに
sshコマンドを実行するとPermission denied
と表示されて、接続に失敗しました。
今回は、vオプションを用いて、sshの挙動を確認します。
考察もなにもないログの一覧です。
環境
接続元:Windows11
接続先:Ubuntu(WSL)
接続先IPアドレス:172.31.66.129
接続先ポート:22
使用する秘密鍵:id_ed25519
※なお、公開鍵認証時は、パスワード認証を無効化しています。
正常時
パスワード認証の場合
PS C:\Users\admin> ssh -v hoge@172.31.66.129
OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
debug1: Connecting to 172.31.66.129 [172.31.66.129] port 22.
debug1: Connection established.
debug1: identity file C:\\Users\\admin/.ssh/id_rsa type -1
debug1: identity file C:\\Users\\admin/.ssh/id_rsa-cert type -1
debug1: identity file C:\\Users\\admin/.ssh/id_ecdsa type 2
debug1: identity file C:\\Users\\admin/.ssh/id_ecdsa-cert type -1
debug1: identity file C:\\Users\\admin/.ssh/id_ecdsa_sk type -1
debug1: identity file C:\\Users\\admin/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file C:\\Users\\admin/.ssh/id_ed25519 type 3
debug1: identity file C:\\Users\\admin/.ssh/id_ed25519-cert type -1
debug1: identity file C:\\Users\\admin/.ssh/id_ed25519_sk type -1
debug1: identity file C:\\Users\\admin/.ssh/id_ed25519_sk-cert type -1
debug1: identity file C:\\Users\\admin/.ssh/id_xmss type -1
debug1: identity file C:\\Users\\admin/.ssh/id_xmss-cert type -1
debug1: identity file C:\\Users\\admin/.ssh/id_dsa type -1
debug1: identity file C:\\Users\\admin/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_9.5
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.9p1 Ubuntu-3ubuntu0.10
debug1: compat_banner: match: OpenSSH_8.9p1 Ubuntu-3ubuntu0.10 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 172.31.66.129:22 as 'hoge'
debug1: load_hostkeys: fopen C:\\Users\\admin/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:eA+eJizeWNrJ8pvkKpKg/kAijeeFni+Yephb4TjH1n0
debug1: load_hostkeys: fopen C:\\Users\\admin/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts2: No such file or directory
debug1: Host '172.31.66.129' is known and matches the ED25519 host key.
debug1: Found key in C:\\Users\\admin/.ssh/known_hosts:7
debug1: ssh_packet_send2_wrapped: resetting send seqnr 3
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: ssh_packet_read_poll2: resetting read seqnr 3
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: get_agent_identities: ssh_get_authentication_socket: No such file or directory
debug1: Will attempt key: C:\\Users\\admin/.ssh/id_rsa
debug1: Will attempt key: C:\\Users\\admin/.ssh/id_ecdsa ECDSA SHA256:Xb7aduDjr4INAqlTv+aGquMNJcFHlts4m/Np+kWBPsA
debug1: Will attempt key: C:\\Users\\admin/.ssh/id_ecdsa_sk
debug1: Will attempt key: C:\\Users\\admin/.ssh/id_ed25519 ED25519 SHA256:wP577zVxGT2TLiDRqDs2ggwBVuLpCOpEtecIRzpEOqQ
debug1: Will attempt key: C:\\Users\\admin/.ssh/id_ed25519_sk
debug1: Will attempt key: C:\\Users\\admin/.ssh/id_xmss
debug1: Will attempt key: C:\\Users\\admin/.ssh/id_dsa
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,webauthn-sk-ecdsa-sha2-nistp256@openssh.com>
debug1: kex_ext_info_check_ver: publickey-hostbound@openssh.com=<0>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: C:\\Users\\admin/.ssh/id_rsa
debug1: Offering public key: C:\\Users\\admin/.ssh/id_ecdsa ECDSA SHA256:Xb7aduDjr4INAqlTv+aGquMNJcFHlts4m/Np+kWBPsA
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: C:\\Users\\admin/.ssh/id_ecdsa_sk
debug1: Offering public key: C:\\Users\\admin/.ssh/id_ed25519 ED25519 SHA256:wP577zVxGT2TLiDRqDs2ggwBVuLpCOpEtecIRzpEOqQ
debug1: Server accepts key: C:\\Users\\admin/.ssh/id_ed25519 ED25519 SHA256:wP577zVxGT2TLiDRqDs2ggwBVuLpCOpEtecIRzpEOqQ
debug1: Trying private key: C:\\Users\\admin/.ssh/id_ed25519_sk
debug1: Trying private key: C:\\Users\\admin/.ssh/id_xmss
debug1: Trying private key: C:\\Users\\admin/.ssh/id_dsa
debug1: Next authentication method: password
hoge@172.31.66.129's password:
Authenticated to 172.31.66.129 ([172.31.66.129]:22) using "password".
debug1: channel 0: new session [client-session] (inactive timeout: 0)
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: filesystem
debug1: ENABLE_VIRTUAL_TERMINAL_INPUT is supported. Reading the VTSequence from console
debug1: ENABLE_VIRTUAL_TERMINAL_PROCESSING is supported. Console supports the ansi parsing
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: client_input_hostkeys: searching C:\\Users\\admin/.ssh/known_hosts for 172.31.66.129 / (none)
debug1: client_input_hostkeys: searching C:\\Users\\admin/.ssh/known_hosts2 for 172.31.66.129 / (none)
debug1: client_input_hostkeys: hostkeys file C:\\Users\\admin/.ssh/known_hosts2 does not exist
debug1: client_input_hostkeys: no new or deprecated keys from server
debug1: Remote: /home/hoge/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: pledge: fork
Welcome to Ubuntu 22.04.3 LTS (GNU/Linux 5.15.153.1-microsoft-standard-WSL2 x86_64)
hoge@DESKTOP-CTSPM2I:~$
公開鍵認証の場合
PS C:\Users\admin> ssh -v hoge@172.31.66.129 -i .\.ssh\id_ed25519
OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
debug1: Connecting to 172.31.66.129 [172.31.66.129] port 22.
debug1: Connection established.
debug1: identity file .\\.ssh\\id_ed25519 type 3
debug1: identity file .\\.ssh\\id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_9.5
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.9p1 Ubuntu-3ubuntu0.10
debug1: compat_banner: match: OpenSSH_8.9p1 Ubuntu-3ubuntu0.10 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 172.31.66.129:22 as 'hoge'
debug1: load_hostkeys: fopen C:\\Users\\admin/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:eA+eJizeWNrJ8pvkKpKg/kAijeeFni+Yephb4TjH1n0
debug1: load_hostkeys: fopen C:\\Users\\admin/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts2: No such file or directory
debug1: Host '172.31.66.129' is known and matches the ED25519 host key.
debug1: Found key in C:\\Users\\admin/.ssh/known_hosts:7
debug1: ssh_packet_send2_wrapped: resetting send seqnr 3
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: ssh_packet_read_poll2: resetting read seqnr 3
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: get_agent_identities: ssh_get_authentication_socket: No such file or directory
debug1: Will attempt key: .\\.ssh\\id_ed25519 ED25519 SHA256:wP577zVxGT2TLiDRqDs2ggwBVuLpCOpEtecIRzpEOqQ explicit
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,webauthn-sk-ecdsa-sha2-nistp256@openssh.com>
debug1: kex_ext_info_check_ver: publickey-hostbound@openssh.com=<0>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: .\\.ssh\\id_ed25519 ED25519 SHA256:wP577zVxGT2TLiDRqDs2ggwBVuLpCOpEtecIRzpEOqQ explicit
debug1: Server accepts key: .\\.ssh\\id_ed25519 ED25519 SHA256:wP577zVxGT2TLiDRqDs2ggwBVuLpCOpEtecIRzpEOqQ explicit
Authenticated to 172.31.66.129 ([172.31.66.129]:22) using "publickey".
debug1: channel 0: new session [client-session] (inactive timeout: 0)
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: filesystem
debug1: ENABLE_VIRTUAL_TERMINAL_INPUT is supported. Reading the VTSequence from console
debug1: ENABLE_VIRTUAL_TERMINAL_PROCESSING is supported. Console supports the ansi parsing
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: client_input_hostkeys: searching C:\\Users\\admin/.ssh/known_hosts for 172.31.66.129 / (none)
debug1: client_input_hostkeys: searching C:\\Users\\admin/.ssh/known_hosts2 for 172.31.66.129 / (none)
debug1: client_input_hostkeys: hostkeys file C:\\Users\\admin/.ssh/known_hosts2 does not exist
debug1: client_input_hostkeys: no new or deprecated keys from server
debug1: Remote: /home/hoge/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: Remote: /home/hoge/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: pledge: fork
Welcome to Ubuntu 22.04.3 LTS (GNU/Linux 5.15.153.1-microsoft-standard-WSL2 x86_64)
hoge@DESKTOP-CTSPM2I:~$
異常(失敗)する場合
IPアドレスの指定が間違っていた場合
PS C:\Users\admin> ssh -v hoge@172.31.66.130
OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
debug1: Reading configuration data C:\\Users\\admin/.ssh/config
debug1: Connecting to 172.31.66.130 [172.31.66.130] port 22.
debug1: connect to address 172.31.66.130 port 22: Connection timed out
ssh: connect to host 172.31.66.130 port 22: Connection timed out
PS C:\Users\admin>
当然、タイムアウトになりました。
ポートの指定が間違っていた場合
PS C:\Users\admin> ssh -v hoge@172.31.66.129 -p 1000
OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
debug1: Reading configuration data C:\\Users\\admin/.ssh/config
debug1: Connecting to 172.31.66.129 [172.31.66.129] port 1000.
debug1: connect to address 172.31.66.129 port 1000: Connection refused
ssh: connect to host 172.31.66.129 port 1000: Connection refused
PS C:\Users\admin>
「Connection refused」と表示されて、パスワードすら入力できない。
ユーザ名の指定が間違っていた場合
PS C:\Users\admin> ssh -v noexistuser@172.31.66.129
OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
debug1: Reading configuration data C:\\Users\\admin/.ssh/config
debug1: Connecting to 172.31.66.129 [172.31.66.129] port 22.
debug1: Connection established.
debug1: identity file C:\\Users\\admin/.ssh/id_rsa type -1
debug1: identity file C:\\Users\\admin/.ssh/id_rsa-cert type -1
debug1: identity file C:\\Users\\admin/.ssh/id_ecdsa type 2
debug1: identity file C:\\Users\\admin/.ssh/id_ecdsa-cert type -1
debug1: identity file C:\\Users\\admin/.ssh/id_ecdsa_sk type -1
debug1: identity file C:\\Users\\admin/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file C:\\Users\\admin/.ssh/id_ed25519 type 3
debug1: identity file C:\\Users\\admin/.ssh/id_ed25519-cert type -1
debug1: identity file C:\\Users\\admin/.ssh/id_ed25519_sk type -1
debug1: identity file C:\\Users\\admin/.ssh/id_ed25519_sk-cert type -1
debug1: identity file C:\\Users\\admin/.ssh/id_xmss type -1
debug1: identity file C:\\Users\\admin/.ssh/id_xmss-cert type -1
debug1: identity file C:\\Users\\admin/.ssh/id_dsa type -1
debug1: identity file C:\\Users\\admin/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_9.5
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.9p1 Ubuntu-3ubuntu0.10
debug1: compat_banner: match: OpenSSH_8.9p1 Ubuntu-3ubuntu0.10 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 172.31.66.129:22 as 'noexistuser'
debug1: load_hostkeys: fopen C:\\Users\\admin/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:eA+eJizeWNrJ8pvkKpKg/kAijeeFni+Yephb4TjH1n0
debug1: load_hostkeys: fopen C:\\Users\\admin/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts2: No such file or directory
debug1: Host '172.31.66.129' is known and matches the ED25519 host key.
debug1: Found key in C:\\Users\\admin/.ssh/known_hosts:7
debug1: ssh_packet_send2_wrapped: resetting send seqnr 3
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: ssh_packet_read_poll2: resetting read seqnr 3
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: get_agent_identities: ssh_get_authentication_socket: No such file or directory
debug1: Will attempt key: C:\\Users\\admin/.ssh/id_rsa
debug1: Will attempt key: C:\\Users\\admin/.ssh/id_ecdsa ECDSA SHA256:Xb7aduDjr4INAqlTv+aGquMNJcFHlts4m/Np+kWBPsA
debug1: Will attempt key: C:\\Users\\admin/.ssh/id_ecdsa_sk
debug1: Will attempt key: C:\\Users\\admin/.ssh/id_ed25519 ED25519 SHA256:wP577zVxGT2TLiDRqDs2ggwBVuLpCOpEtecIRzpEOqQ
debug1: Will attempt key: C:\\Users\\admin/.ssh/id_ed25519_sk
debug1: Will attempt key: C:\\Users\\admin/.ssh/id_xmss
debug1: Will attempt key: C:\\Users\\admin/.ssh/id_dsa
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,webauthn-sk-ecdsa-sha2-nistp256@openssh.com>
debug1: kex_ext_info_check_ver: publickey-hostbound@openssh.com=<0>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: C:\\Users\\admin/.ssh/id_rsa
debug1: Offering public key: C:\\Users\\admin/.ssh/id_ecdsa ECDSA SHA256:Xb7aduDjr4INAqlTv+aGquMNJcFHlts4m/Np+kWBPsA
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: C:\\Users\\admin/.ssh/id_ecdsa_sk
debug1: Offering public key: C:\\Users\\admin/.ssh/id_ed25519 ED25519 SHA256:wP577zVxGT2TLiDRqDs2ggwBVuLpCOpEtecIRzpEOqQ
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: C:\\Users\\admin/.ssh/id_ed25519_sk
debug1: Trying private key: C:\\Users\\admin/.ssh/id_xmss
debug1: Trying private key: C:\\Users\\admin/.ssh/id_dsa
debug1: Next authentication method: password
noexistuser@172.31.66.129's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
noexistuser@172.31.66.129's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
noexistuser@172.31.66.129's password:
debug1: Authentications that can continue: publickey,password
debug1: No more authentication methods to try.
noexistuser@172.31.66.129: Permission denied (publickey,password).
PS C:\Users\admin>
普通にパスワードを求められて、ユーザがいないことは表示されない。ユーザ名の指定間違いはメッセージから気づくことが難しい。(セキュリティ的に攻撃者への情報提供になるので当然かも?)
パスワード認証でパスワードが誤っている場合
PS C:\Users\admin> ssh -v hoge@172.31.66.129
OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
debug1: Connecting to 172.31.66.129 [172.31.66.129] port 22.
debug1: Connection established.
debug1: identity file C:\\Users\\admin/.ssh/id_rsa type -1
debug1: identity file C:\\Users\\admin/.ssh/id_rsa-cert type -1
debug1: identity file C:\\Users\\admin/.ssh/id_ecdsa type 2
debug1: identity file C:\\Users\\admin/.ssh/id_ecdsa-cert type -1
debug1: identity file C:\\Users\\admin/.ssh/id_ecdsa_sk type -1
debug1: identity file C:\\Users\\admin/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file C:\\Users\\admin/.ssh/id_ed25519 type -1
debug1: identity file C:\\Users\\admin/.ssh/id_ed25519-cert type -1
debug1: identity file C:\\Users\\admin/.ssh/id_ed25519_sk type -1
debug1: identity file C:\\Users\\admin/.ssh/id_ed25519_sk-cert type -1
debug1: identity file C:\\Users\\admin/.ssh/id_xmss type -1
debug1: identity file C:\\Users\\admin/.ssh/id_xmss-cert type -1
debug1: identity file C:\\Users\\admin/.ssh/id_dsa type -1
debug1: identity file C:\\Users\\admin/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_9.5
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.9p1 Ubuntu-3ubuntu0.10
debug1: compat_banner: match: OpenSSH_8.9p1 Ubuntu-3ubuntu0.10 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 172.31.66.129:22 as 'hoge'
debug1: load_hostkeys: fopen C:\\Users\\admin/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:eA+eJizeWNrJ8pvkKpKg/kAijeeFni+Yephb4TjH1n0
debug1: load_hostkeys: fopen C:\\Users\\admin/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts2: No such file or directory
debug1: Host '172.31.66.129' is known and matches the ED25519 host key.
debug1: Found key in C:\\Users\\admin/.ssh/known_hosts:7
debug1: ssh_packet_send2_wrapped: resetting send seqnr 3
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: ssh_packet_read_poll2: resetting read seqnr 3
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: get_agent_identities: ssh_get_authentication_socket: No such file or directory
debug1: Will attempt key: C:\\Users\\admin/.ssh/id_rsa
debug1: Will attempt key: C:\\Users\\admin/.ssh/id_ecdsa ECDSA SHA256:Xb7aduDjr4INAqlTv+aGquMNJcFHlts4m/Np+kWBPsA
debug1: Will attempt key: C:\\Users\\admin/.ssh/id_ecdsa_sk
debug1: Will attempt key: C:\\Users\\admin/.ssh/id_ed25519
debug1: Will attempt key: C:\\Users\\admin/.ssh/id_ed25519_sk
debug1: Will attempt key: C:\\Users\\admin/.ssh/id_xmss
debug1: Will attempt key: C:\\Users\\admin/.ssh/id_dsa
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,webauthn-sk-ecdsa-sha2-nistp256@openssh.com>
debug1: kex_ext_info_check_ver: publickey-hostbound@openssh.com=<0>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: C:\\Users\\admin/.ssh/id_rsa
debug1: Offering public key: C:\\Users\\admin/.ssh/id_ecdsa ECDSA SHA256:Xb7aduDjr4INAqlTv+aGquMNJcFHlts4m/Np+kWBPsA
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: C:\\Users\\admin/.ssh/id_ecdsa_sk
debug1: Trying private key: C:\\Users\\admin/.ssh/id_ed25519
debug1: Trying private key: C:\\Users\\admin/.ssh/id_ed25519_sk
debug1: Trying private key: C:\\Users\\admin/.ssh/id_xmss
debug1: Trying private key: C:\\Users\\admin/.ssh/id_dsa
debug1: Next authentication method: password
hoge@172.31.66.129's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
hoge@172.31.66.129's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
hoge@172.31.66.129's password:
debug1: Authentications that can continue: publickey,password
debug1: No more authentication methods to try.
hoge@172.31.66.129: Permission denied (publickey,password).
Discussion