我在使用公钥认证设置OpenSSH for Windows时遇到问题.
我在本地桌面上工作,可以使用Unix机器或其他OpenSSH for Windows机器上的密钥进行ssh.
我已将构建复制到服务器上,我可以使密码验证工作正常,但是当我使用密钥时,我得到以下问题:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug3: start over, passed a different list publickey,password,keyboard-interactive
debug3: preferred 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: /cygdrive/c/sshusers/jsadmint2232/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
Connection closed by 127.0.0.1
Run Code Online (Sandbox Code Playgroud)
因此,出于测试目的,我一直尝试SSH到localhost,但即使远程尝试,我也会遇到同样的问题.
更奇怪的是,当我启用了密码和公钥时sshd_config,它只会尝试使用密钥,然后使用上述消息轰炸,甚至不会尝试使用密码.
以下是我采取的步骤: