概要
SSH接続しようとすると、公開鍵認証を設定してもパスワードを聞かれます。
鍵はRSA2,12288bitで、RLoginで生成しました。opensshでエクスポートして、
「RSA2認証鍵の署名方法を拡張(サーバーの対応が必要)」ではSHA2-256に設定しています。
パスワードを入力しないと
RLogin
1SSH2 User Auth Failure "publickey,password" Status=0004 2Send Discconect Message.. 3publickery(rsa-sha2-256),publickey(rsa-sha2-256),password($User)
と表示されてしまいます。
ssh -vでは
ssh -v -i "c:\users***\desktop\id_rsa" -p ****
OpenSSH_for_Windows_8.9p1, LibreSSL 3.4.3 debug1: Connecting to ***.** debug1: Connection established. debug1: identity file c:\\****\desktop\id_rsa type 0 debug1: identity file c:\\*****\desktop\id_rsa-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.9 debug1: Remote protocol version 2.0, remote software version OpenSSH_8.2p1 Ubuntu-4ubuntu0.5 debug1: compat_banner: match: OpenSSH_8.2p1 Ubuntu-4ubuntu0.5 pat OpenSSH* compat 0x04000000 debug1: Authenticating to ***.**:*** as 'user' debug1: load_hostkeys: fopen C:\\Users\\***/.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:9Kbpa77XQpjpUW5aIprNq1WkBhqSHdDz8nLbUFVhS6c debug1: load_hostkeys: fopen C:\\Users\\***/.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 '[***.**]' is known and matches the ED25519 host key. debug1: Found key in C:\\Users\\***/.ssh/known_hosts:1 debug1: rekey out after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey in after 134217728 blocks debug1: get_agent_identities: agent returned 1 keys debug1: Will attempt key: c:\\users\\***\\desktop\\id_rsa RSA SHA256:hnjc+bLjvNjRegdNch3x2LYSOLhehNBSKNS5gCf8Agw explicit agent 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> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Offering public key: c:\\users\\***\\desktop\\id_rsa RSA SHA256:hnjc+bLjvNjRegdNch3x2LYSOLhehNBSKNS5gCf8Agw explicit agent debug1: Authentications that can continue: publickey,password debug1: Next authentication method: password ***@***.**'s password: Authenticated to ***.** ([***.**.**.***]:****) using "password". debug1: channel 0: new [client-session] 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\\***/.ssh/known_hosts for [***.**/ (none) debug1: client_input_hostkeys: searching C:\\Users\\***/.ssh/known_hosts2 for [***.**/ (none) debug1: client_input_hostkeys: hostkeys file C:\\Users\\***/.ssh/known_hosts2 does not exist debug1: client_global_hostkeys_private_confirm: server used untrusted RSA signature algorithm ssh-rsa for key 0, disregarding debug1: update_known_hosts: known hosts file C:\\Users\\***/.ssh/known_hosts2 does not exist
となりました。
追記
サーバーのauth.logの中身です
Sep 20 14:04:56 160-251-101-53 auth: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=vilma rhost=5.34.207.167 Sep 20 14:04:57 160-251-101-53 auth: pam_unix(dovecot:auth): check pass; user unknown Sep 20 14:04:57 160-251-101-53 auth: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=opendkim@***.** rhost=5.34.207.46 Sep 20 14:05:01 160-251-101-53 CRON[1339168]: pam_unix(cron:session): session opened for user root by (uid=0) Sep 20 14:05:01 160-251-101-53 CRON[1339167]: pam_unix(cron:session): session opened for user munin by (uid=0) Sep 20 14:05:01 160-251-101-53 CRON[1339168]: pam_unix(cron:session): session closed for user root Sep 20 14:05:08 160-251-101-53 auth: pam_unix(dovecot:auth): check pass; user unknown Sep 20 14:05:08 160-251-101-53 auth: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=ead rhost=5.34.207.211 Sep 20 14:05:14 160-251-101-53 CRON[1339167]: pam_unix(cron:session): session closed for user munin Sep 20 14:05:15 160-251-101-53 auth: pam_unix(dovecot:auth): check pass; user unknown Sep 20 14:05:15 160-251-101-53 auth: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=werner rhost=5.34.207.211 Sep 20 14:05:15 160-251-101-53 auth: pam_unix(dovecot:auth): check pass; user unknown Sep 20 14:05:15 160-251-101-53 auth: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=ecms rhost=5.34.207.167 Sep 20 14:05:16 160-251-101-53 sudo: user : TTY=pts/0 ; PWD=/var/log ; USER=root ; COMMAND=/usr/bin/vim auth.log Sep 20 14:05:16 160-251-101-53 sudo: pam_unix(sudo:session): session opened for user root by user(uid=0)
パスワード認証の後のssh -vのログです
Authenticated to ***.**) using "password". debug1: channel 0: new [client-session] 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\\***/.ssh/known_hosts for [shurin.dev]:14810 / (none) debug1: client_input_hostkeys: searching C:\\Users\\***/.ssh/known_hosts2 for [shurin.dev]:14810 / (none) debug1: client_input_hostkeys: hostkeys file C:\\Users\***/.ssh/known_hosts2 does not exist debug1: client_global_hostkeys_private_confirm: server used untrusted RSA signature algorithm ssh-rsa for key 0, disregarding debug1: update_known_hosts: known hosts file C:\\Users\\***/.ssh/known_hosts2 does not exist

あなたの回答
tips
プレビュー