新買了一臺阿里云機,用securecrt去連接,如下報錯
這個錯誤表明你的 SSH 客戶端與服務器之間無法就密鑰交換方法和主機密鑰算法達成一致,導致連接失敗。這通常是由于客戶端和服務器支持的加密算法集不匹配造成的。
解決方式
編輯服務器的/etc/ssh/sshd_config,添加
HostKeyAlgorithms ssh-dss,ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
然后重啟ssh/sshd解決