升级openssh需要升级openssl,但是升级之后,从低版本的ssh登录到高版本的ssh会出现各种各样的问题,下面介绍从Solaris系统登录到Linux7.1系统的ssh登录问题
由于Linux系统148的ssh升级导致无法从Solaris系统233上ssh登录该设备,报错如下所示:
bash-3.00$ ssh root@107.131.221.148
no common kex alg: client 'diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1', server 'curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1'
解决方法:
登录到107.131.221.148修改/etc/ssh/sshd_config文件,在文件的末尾添加如下内容:
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
然后重启ssh服务,启动命令为systemctl restart sshd