原因是SSH升级后,为了安全,默认不再采用原来的一些加密算法,需要手动添加
1、在/etc/ssh/sshd_config的结尾添加
Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc
MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha1-96,hmac-md5-96
KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,curve25519-sha256@libssh.org
2、重启
Centos 7 重启ssh服务命令:systemctl restart sshd.service
Ubuntu 重启ssh服务命令:/etc/init.d/ssh restart
3、systemctl status sshd.service查看启动状态,报错
3.1 sshd启动报错:Bad SSH2 cipher spec '...'
剔除掉Ciphers行不支持的值
4、重启解决
https://segmentfault.com/a/1190000018629266?utm_source=tag-newest
https://kingzcheung.com/archives/116.html
https://www.cnblogs.com/linxx/p/7707615.html
ssh -Q cipher查看支持的cipher
ssh -Q mac 查看支持的mac