1. 程式人生 > 其它 >xshell4連線ubuntu20.04失敗,提示“找不到匹配的key exchange演算法“

xshell4連線ubuntu20.04失敗,提示“找不到匹配的key exchange演算法“

xshell4連線ubuntu20.04失敗,提示“找不到匹配的key exchange演算法“

本文連結:https://blog.csdn.net/qq_24814027/article/details/120944054    

對比ubuntu18.04,ubuntu20.04的key exchange演算法
diffie-hellman-group14-sha1升級到了diffie-hellman-group14-sha256
xshell4版本估計不支援diffie-hellman-group14-sha256導致

解決方法:
增加ubuntu20.04 key excange演算法diffie-hellman-group14-sha1

,相容xshell4

echo "KexAlgorithms +diffie-hellman-group14-sha1" >>/etc/ssh/sshd_config
systemctl restart sshd
##注意+號不能省略,+是追加演算法
    sudo passed root

 

 

1:解除安裝openssh
sudo apt-get autoremove --purge openssh-server openssh-client

2:更新
sudo apt-get update

3:安裝ssh服務端和客戶端
sudo apt-get install openssh-server openssh-client

4:檢視服務是否啟動
ps -e|grep ssh

5:啟動ssh
sudo service ssh start

6:若啟動失敗,瞭解錯誤原因
sshd -t

7:確認ssh-server已經正常工作
netstat -tlp