SSH Client连接Linux出现~server responded “Algorithm negotiation failes”

一、问题描述:近日使用SSH远程连接linux服务器的时候,出现了“server responded ‘Algorithm negotiation failes’”连接不上,查阅了很多资料,才把该问题解决了,特地分享出来给大家
这里写图片描述
【备注:】如果不会使用SSH Client的读者,建议你们可以去看我写的“如何使用SSH Client”基础入门一篇
http://blog.csdn.net/xiaozhegaa/article/details/76358510
二、问题分析:服务器响应通过失败
深入分析:以前使用ssh连接linux是没有该错误提示的,现在连接就报错。原因是:在新版本的ssh,连接数据库的时候,它带上一个key加密,保证连接的安装。新linux自带的ssh没有加上改key(密钥),所以我们手动把它加上去就可以了

三、操作步骤如下:
1、修改ssh的配置文件

vim /etc/ssh/sshd_config
//或者
sudo vi /etc/ssh/sshd_config  

这里写图片描述
2、在sshd_config配置文件末尾中添加:

Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc  
MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96  
KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,curve25519-sha256@libssh.org 

这里写图片描述
【备注】:直接copy上述代码到控制台,保存退出就

//或者
Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc
MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96
KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,curve25519-sha256@libssh.org

3、重启sshd服务后,即可正常连接

sudo service ssh restart

4、再次使用ssh去连接linux,就发现可以了
这里写图片描述
5、不会再出现上述的错误了

  • 6
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值