ssh服务报错

报错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”取消注释
image.png

报错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
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。