“权限被拒绝(公钥)。” Cygwin更新后


11

我更新了Cygwin,无法再通过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).

Answers:


14

问题是在cygwin更新之后,我有了OpenSSH v7,它不再认为我的旧SSH密钥足够安全。

您可以在上面的调试信息中看到它是ssh-dss关键。

简单的解决方法是将此添加PubkeyAcceptedKeyTypes ssh-dss~/.ssh/config

更好的解决方案当然是生成一个新的安全密钥对。


很好地抓住了“陷阱”!
JakeGould

1
您是说OpenSSH v7吗?我很确定OpenSSL仍在v1上
redreinard 2015年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.