您的位置:首页 > 编程语言 > Go语言

SSHException: Incompatible ssh peer (no acceptable kex algorithm)

2015-12-23 10:19 579 查看
使用公司维护助手(python开发)执行巡检,导入主机信息时,发现无法连接,报错信息如下:

2015-12-22 15:41:12,983: 15004 ERROR: paramiko.transport: Exception: Incompatible ssh peer (no acceptable kex algorithm)
2015-12-22 15:41:12,983: 15004 ERROR: paramiko.transport: Traceback (most recent call last):
2015-12-22 15:41:12,983: 15004 ERROR: paramiko.transport:   File "paramiko\transport.pyc", line 1584, in run
2015-12-22 15:41:12,983: 15004 ERROR: paramiko.transport:   File "paramiko\transport.pyc", line 1663, in _negotiate_keys
2015-12-22 15:41:12,983: 15004 ERROR: paramiko.transport:   File "paramiko\transport.pyc", line 1776, in _parse_kex_init
2015-12-22 15:41:12,983: 15004 ERROR: paramiko.transport: SSHException: Incompatible ssh peer (no acceptable kex algorithm)
2015-12-22 15:41:12,983: 15004 ERROR: paramiko.transport:
2015-12-22 15:41:13,000: 6124 ERROR: SSHClient.login: Traceback (most recent call last):
File ".\LIB\Framework\MAProtocols\Communication\MASFTP.py", line 305, in loginViaPwd
File "paramiko\transport.pyc", line 1006, in connect
File "paramiko\transport.pyc", line 464, in start_client
SSHException: Incompatible ssh peer (no acceptable kex algorithm)
搜索发现有人说是paramiko模块版本问题,重试另一台服务器,发现可以连接,排除客户端问题;

想起曾经自动部署工具ideploy连接不上的配置,于是比对/etc/ssh/sshd_conf/usr/etc/sshd_conf文件,发现能连接上的机器比不能连接上的机器末尾多了一行加密算法

KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
查看ssh版本

OS01:~ # ssh -V
OpenSSH_6.9p1, OpenSSL 1.0.1j 15 Oct 2014


基本确认与上次JSch程序连接不上原因一致,ssh 6.7以上屏蔽不安全算法,配置即可解决
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: