0%

ssh 升级导致 git clone 失败

错误信息

Unable to negotiate with 192.168.110.254 port 29418: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group1-sha1

ssh unable to negotiate - no matching key exchange method found
How to fix: No matching key exchange method found by OpenSSH 7.0

新老版本兼容性问题,需要增加对老旧算法支持

  • ~/.ssh/config
    Host somehost.example.org
      KexAlgorithms +diffie-hellman-group1-sha1
  • /etc/ssh/ssh_config
    Host somehost.example.org
      KexAlgorithms +diffie-hellman-group1-sha1