1. 程式人生 > >OpenSSL升級導致ssh無法正常登陸

OpenSSL升級導致ssh無法正常登陸

     升級openssh需要升級openssl,但是升級之後,從低版本的ssh登入到高版本的ssh會出現各種各樣的問題,下面介紹從Solaris系統登入到Linux7.1系統的ssh登入問題

由於Linux系統148的ssh升級導致無法從Solaris系統233上ssh登入該裝置,報錯如下所示:         
bash-3.00$ ssh [email protected]
no common kex alg: client 'diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1', server '

[email protected],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,

[email protected]
然後重啟ssh服務,啟動命令為systemctl restart sshd