sudo passwd
cd /etc/apt
cp sources.list sources.list.backup
https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
apt-get update
apt-get remove openssh-server -y
apt-get install openssh-server -y
vim /etc/ssh/sshd_config
Port 2222 # 默认的是22,但是windows有自己的ssh服务用的也是22端口,修改一下
UsePrivilegeSeparation no
PasswordAuthentication yes
AllowUsers root
PermitRootLogin yes
service ssh --full-restart