一、系统本身自带的SSH有问题,需要remove一下,重新install一下
sudo apt-get remove openssh-server
二、然后重新安装
sudo apt-get install openssh-server
三、配置sshd_config
sudo vim /etc/ssh/
sshd_config
Port 22
PasswordAuthentication yes # 允许用户名密码方式登录
四、修改完后重启SSH服务
sudo service ssh restart
转载于:https://www.cnblogs.com/duanjinjie/p/11606193.html