我更新了赛格威并且我无法再通过 SSH 连接到任何远程机器。
这是来自 SSH 的相关调试输出;发生了什么?
debug1: Server host key: ssh-rsa SHA256:VTUSWVnLWQ6ohJ0hZ7vcswPKnuBsXSqtqH054jWxMAA
debug1: Host 'xxx.yyy.zz' is known and matches the RSA host key.
debug1: Found key in /home/nifle/.ssh/known_hosts:5
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
debug1: Next authentication method: publickey
debug1: Trying private key: /home/nifle/.ssh/id_rsa
debug1: Skipping ssh-dss key /home/nifle/.ssh/id_dsa for not in PubkeyAcceptedKeyTypes
debug1: No more authentication methods to try.
Permission denied (publickey).
答案1
问题是,在 cygwin 更新之后,我有了 OpenSSH v7,它不再认为我的旧 SSH 密钥足够安全。
您可以在上面的调试信息中看到它是一个ssh-dss
密钥。
简单的解决方法是将其添加PubkeyAcceptedKeyTypes ssh-dss
到~/.ssh/config
当然,更好的解决方案是生成一个新的安全密钥对。