Unable to negotiate with 10.74.185.240 port 29420: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 Unable to negotiate with 10.74.185.240 port 29420: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group1-sha1怎么解决
时间: 2024-01-01 21:13:55 浏览: 63
这个错误通常是由于SSH客户端和服务器之间的密钥交换方法不匹配导致的。你可以尝试以下方法解决这个问题:
1. 升级SSH客户端到最新版本,以支持更多的密钥交换方法。
2. 修改SSH服务器端的配置文件,增加支持的密钥交换方法。具体方法是:编辑SSH服务器端的sshd_config文件,在文件中添加以下代码:
```
KexAlgorithms diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
```
3. 如果你无法修改SSH服务器端的配置文件,那么你可以尝试使用其他的SSH客户端,例如PuTTY或者SecureCRT,这些客户端通常支持更多的密钥交换方法,可以避免这个问题。
希望这些方法能够帮助你解决问题!
相关问题
Unable to negotiate with 192.168.1.1 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1
这错误通常表示您正在使用的SSH客户端版本太新,不支持旧的密钥交换算法。建议您更新您的SSH客户端版本或者要求目标主机管理员升级其SSH服务端版本以支持更安全的密钥交换算法。如果您无法更新您的SSH客户端版本,则可以尝试使用以下命令连接到目标主机:
```
ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 user@192.168.1.1
```
这将在SSH连接中强制使用旧的密钥交换算法。但需要注意的是,这种方式存在安全风险,因为旧的密钥交换算法存在漏洞,可能会导致SSH连接被攻击者窃取信息。
Unable to negotiate with 10.128.0.0 port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss
"Unable to negotiate with 10.128.0.0 port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss" 这个错误表示终端无法与目标主机建立SSH连接,因为没有找到匹配的主机密钥类型。在新版的OpenSSH中,默认不再支持使用SHA1这种较弱的散列算法。要解决这个问题,我们需要手动允许对于SHA1的支持。
为了解决这个问题,您可以尝试以下步骤:
1. 在终端中使用以下命令连接到目标主机:
ssh -oHostKeyAlgorithms=+ssh-rsa -oKexAlgorithms=+diffie-hellman-group1-sha1 user@10.128.0.0
这将允许使用ssh-rsa主机密钥类型和diffie-hellman-group1-sha1密钥交换方法进行连接。
2. 如果第一步无效,您可以尝试在SSH配置文件中进行更改。打开SSH配置文件(通常位于/etc/ssh/或~/.ssh/目录下的ssh_config文件),找到HostKeyAlgorithms和KexAlgorithms这两个选项,将它们的值分别改为:
HostKeyAlgorithms +ssh-rsa
KexAlgorithms +diffie-hellman-group1-sha1
3. 保存并关闭配置文件,然后尝试重新连接到目标主机。
通过以上步骤,您应该能够解决"Unable to negotiate with 10.128.0.0 port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss"的问题。记得在连接之前备份配置文件,以便在需要时进行恢复。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [Unable to negotiate with 172.16.28.137 port 22: no matching host key type found. Their offer: ssh-rs](https://blog.csdn.net/wuliuqi_567/article/details/128103215)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [Unable to negotiate with 192.168.2.53 port 22: no matching host key type found. Their offer: ssh-rsa](https://blog.csdn.net/weixin_43025071/article/details/128241732)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)