SSHException: Incompatible ssh peer (no acceptable kex algorithm)

      使用公司维护助手(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以上屏蔽不安全算法,配置即可解决


  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值