升級完openssh版本後 xshell連線報錯 提示“伺服器傳送了一個意外的資料包。Received:3,expected:20” 問題解決
阿新 • • 發佈:2020-12-31
技術標籤:openssh升級xshell報錯sshlinuxcentos伺服器openssh
升級完openssh版本後 xshell連線報錯 提示“伺服器傳送了一個意外的資料包。Received:3,expected:20”
如下圖
修改配置檔案 /etc/ssh/sshd_config 在最後一行新增下列金鑰
vi /etc/ssh/sshd_config
最後一行新增
KexAlgorithms curve25519-[email protected].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
新增完儲存退出
重啟sshd服務
systemctl restart sshd
再次連線就沒有問題了