对于工作,我通过 SSH 连接到服务器。我已经几个月没有这样做了,所以现在要求我输入密码的地方发生了一些变化。以前,经过身份验证后它会起作用。这是我通常写入 ssh 的内容:ssh -p2222 username@123.12.123.123
我查看了调试信息,它表明服务器甚至没有要求提供适当的密钥文件。相反,它首先提供一个我删除的公钥 (id_rsa)..然后它变成了私钥......然后它要求输入一个我不需要的密码。
debug1: Found key in /Users/myname/.ssh/known_hosts:40
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/myname/.ssh/id_rsa
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Trying private key: /Users/myname/.ssh/id_rsa
debug1: Trying private key: /Users/myname/.ssh/id_dsa
debug1: Next authentication method: password
Run Code Online (Sandbox Code Playgroud)
但是,当我指定身份文件时,它可以工作:ssh …