SSH密钥协商失败,此问题为密钥类型缺失导致,现在遇到的类型有如下几个
1、Their offer: aes256-cbc,aes128-cbc,3des-cbc,des-cbc
Unable to negotiate with xx.xx.xx.xx port 22: no matching cipher found. Their offer: aes256-cbc,aes128-cbc,3des-cbc,des-cbc
无法与xx.xx.xx.xx 端口22协商:未找到匹配的密码。他们的报价:AES256 CBC、AES128 CBC、3DES CBC、DES CBC
可以在本地的/etc/ssh/ssh_config 文件中追加
Ciphers +aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc
如果不想在全局中改也可在用户的配置是~/.ssh/config
理论上需要重启ssh服务,但这次忘了重启服务命令了,没有重启再次尝试可以了,提示输入密码
2、Their offer:ssh-dss
另一种密钥类型
终端远程登录ssh时,提示如下错误:
Unable to negotiate with 192.168.1.152 port 22: nomatching host host key type found. Their offer:ssh-dss
由提示得知,ssh不能远程登录的原因为:没有找到相关的主机密钥类型。
1、确实是主机密钥类型不符合
2、不存在相关主机密钥类型
指定主机key算法(最后解决方案):