mac升级到Sierra 后的情况

当我把mac升级到Sierra时,用git拉代码时报错:

Unable to negotiate with <ip> port <port>: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

原因如下:

 Because of the latest OpenSSH version, some older (legacy) encryption algorithm have been removed from the default and therefore removed by default.

发现牛逼的google已经把sha1攻下了,sha1已经不安全了,google建议使用ssh-256.here

解决:

vim /etc/ssh/ssh_config
添加
HostkeyAlgorithms ssh-dss,ssh-rsa
KexAlgorithms diffie-hellman-group1-sha1
到文件末尾

这样就好了。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容