报错1
Unable to negotiate with xx.xxx.xxx.x port 22:no matching cipher found. Their offer: aes128-cbc,aes256-cbc,3des-cbc,des-cbc
定位问题
因为版本问题导致不支持对远程主机的ssh解密
解决办法
将该主机配置文件/etc/ssh/ssh_conf中的默认注释:“Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc”取消注释
报错2
Unable to negotiate with ip port port: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
问题定位
远程主机提示没有匹配的密钥类型
解决办法
创建~/.ssh/config文件并添加密钥类型
cat /root/.ssh/config
Host *
KexAlgorithms +diffie-hellman-group1-sha1
Ciphers +aes128-cbc