Unable to negotiate with 106.52.160.162 port 22: no matching host key type found. Their offer: ssh-rsa
时间: 2023-10-19 11:09:12 浏览: 307
出"Unable to negotiate with 106.52.160.162 port 22: no matching host key type found. Their offer: ssh-rsa"的错误提示是因为Git找不到支持的密钥交换方法。新版Openssh中不再支持SHA1这种hash散列算法,需要手动允许对于SHA1的支持。
解决办法是在生成公钥的.ssh文件夹中,新建一个没有后缀的config文件,并在其中添加以下内容:
Host *
HostkeyAlgorithms ssh-rsa
PubkeyAcceptedKeyTypes ssh-rsa
保存后,再次使用git命令应该就能恢复正常啦。
阅读全文
相关推荐






