原文链接: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. C++/JAVA/C#子类调用父类函数情况[留存]

    时间久了就容易记不清了,特留存备用查看 c++ 1.构造函数调用   常用初始化列表  或者显示调用 1.1同一个类中构造函数调用构造函数   尽量不要这样做,因为结果不确定!避免麻烦(C++11增加 ...

  2. Python全栈-day11-函数3

    装饰器 1.开放封闭原则 通常情况下,软件一旦上线就应该遵循开放封闭原则,即对修改封闭.对扩展开放 扩展开放需遵循两个原则: 1)不修改源代码 2)不修改原函数的调用方式 2.装饰器 器指的是工具,装 ...

  3. I/O流的概念和流类库的结构

    概念: 程序的输入指的是从输入文件将数据传送给程序,程序的输出指的是从程序将数据传送给输出文件. C++输入输出包含以下三个方面的内容: 1.对系统指定的标准设备的输入和输出.即从键盘输入数据,输出到 ...

  4. 支持向量机SVM 参数选择

    http://ju.outofmemory.cn/entry/119152 http://www.cnblogs.com/zhizhan/p/4412343.html 支持向量机SVM是从线性可分情况 ...

  5. C# WPF Halcon HDevEngine混合编程

    1. WPF+Halcon 引用halcondotnet.dll和hdevenginedotnet.dll XAML中导入命名空间xmlns:halcon=”clr-namespace:HalconD ...

  6. Python - 3. Input and Output

    from:http://interactivepython.org/courselib/static/pythonds/Introduction/InputandOutput.html Input a ...

  7. Solid Dominoes Tilings (轮廓线dp打表 + 容器)

    第一步先打一个表,就是利用轮廓线DP去打一个没有管有没有分界线组合数量的表 #include<bits/stdc++.h> using namespace std; ; <<; ...

  8. 【Elasticsearch学习之一】Elasticsearch

    环境 虚拟机:VMware 10 Linux版本:CentOS-6.5-x86_64 客户端:Xshell4 FTP:Xftp4 jdk8 一.概念ElasticSearch: 基于Lucene全文搜 ...

  9. c++学习笔记(六)- vector使用和内存分配

    -----------------------------2019/01/15------------------------------- 复习了下迭代器,其实c++参考里讲的很清楚,主要需要辨析规 ...

  10. tcp/ip 3次握手和4次挥手

    tcp/ip 3次握手和4次挥手