ubuntu服务器正用着好好的,可能因为一次断电关机后,突然不能远程登录了,用SSH也连接不上。
最后的解决办法:
1. 在ubuntu上卸载ssh
sudo apt-get remove openssh-server
sudo apt-get remove openssh-client
2. 删除 /etc/ssh文件夹(这一步很关键!)
cd /etc
sudo rm -r ssh
3. 重新安装ssh
sudo apt-get install openssh-server
sudo apt-get install openssh-client
我通过这种方法解决问题了。