SecureCRT 終端軟件連接linux操作系統,出現如下錯誤:
英文描述:Key exchange failed. No compatible key exchange method. The server supports these methods: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256
中文描述:密鑰交換失敗。沒有兼容的密鑰交換方法。服務器支持以下方法:ecdh-sha2-nistp256、ecdh-sha2-nistp384、ecdh-sha2-nistp521、diffie-hellman-group-exchange-sha256
解決方法:
//使用root用戶,變更ssh客戶端配置 cd /etc/ssh vi ssh_config //取消如下兩行注釋 Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
//使用root用戶,變更ssh服務端配置. vi sshd_config
復制上述兩行到sshd_config中。
如果有其它密鑰交換語句,則注釋掉。
//重啟系統
reboot