Chinaunix

标题: ssh连接问题 加密方式 老大帮帮忙 [打印本页]

作者: lingshiba    时间: 2014-11-12 16:29
标题: ssh连接问题 加密方式 老大帮帮忙
本帖最后由 lingshiba 于 2014-11-13 03:44 编辑

更新ssh到openssh-6.7p1.tar最新版,然后问题来了,ssh client连不上了,putty可以,SecureCRT 7.1可以 5.1又不行了,查了一下说加密协议不对,可是我不会,请教各位

白天图挂了,手动上字

crt5.1 连提示: 到会话1.1.1.1 的连接失败:
                密钥交换失败。
                没有兼容的加密程序。服务器支持这些加密程序:
                aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-      

                gcm@openssh.com,chacha20-poly1305@openssh.com

ssh client 提示:Server responded"Algorithm negotiation failed"
                 Key exchange with the remote host failed. This can happen for
                 example computer does not support the selected algorthms.


下面是错误截图,



作者: yyu0378    时间: 2014-11-12 23:40
图挂了,字数补丁
作者: lingshiba    时间: 2014-11-13 03:45
回复 2# yyu0378

已经打字了,帮忙看一下

   
作者: abc3w    时间: 2014-11-13 08:43
删除ssh client的key试试
作者: yyu0378    时间: 2014-11-13 10:24
尝试用密码方式登录,试试看
作者: lingshiba    时间: 2014-11-13 11:32
已经删了  虚拟机装了ssh  排除 key 回复 4# abc3w


   
作者: lingshiba    时间: 2014-11-13 11:33
不行  还是老错误 回复 5# yyu0378


   
作者: c11v11    时间: 2014-11-19 16:14
回复 1# lingshiba


   这个要看server端和client端支持的加密类型了 如果不匹配的话 那key exchange就不会成功了 其实你的问题感觉是有些版本的client端有些加密方式不支持
作者: vermouth    时间: 2014-11-19 16:47
连接的时候不是可以选择加密方式么?
作者: 留香宝宝    时间: 2014-11-23 15:57
遇到了同样的问题,也是升级所致,症状完全同楼主,同求解决方法。
作者: 留香宝宝    时间: 2014-11-24 08:28
问题已经解决了,修改ssh的配置文件 /etc/ssh/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

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

ps:导致此问题的原因是ssh升级后,为了安全,默认不在采用原来一些加密算法,我们手工添加进去即可。

作者: starflysd    时间: 2015-01-06 14:18
呵呵,同样的问题。解决了。。。
作者: xjxh829    时间: 2015-04-13 11:50
回复 11# 留香宝宝

这个方法测试不行。。。
   
作者: ksfksf    时间: 2015-06-04 21:08
回复 11# 留香宝宝


    非常感谢,解决了
作者: yoshubom    时间: 2015-07-02 11:50
回复 11# 留香宝宝

该方法果然奏效,多谢!
   
作者: czjin    时间: 2015-11-04 11:02
我按照楼主所说在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
下图:

作者: ttxx    时间: 2016-02-16 15:29
已测试,,修改以后重启sshd服务,,就可以连接了。
作者: chenyx    时间: 2016-02-26 19:44
那些加密协议是被废弃不用了吧
作者: lgy003    时间: 2016-03-02 09:23
看下是不是服务器端和客户端都得升级到同一个版本啊,有版本不一致的可能性?
作者: 加油365    时间: 2016-06-07 09:33
您好 这个问题请问解决了吗 我这边遇到同样的问题。。。




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2