一. Ubuntu开启22端口
sudo apt-get install openssh-server 下载ssh
systemctl ssh start 开启
二. Ubuntu初始化root密码
sudo passwd root
三. Ubuntu在xshell上登录root
vi /etc/ssh/sshd_config 注释掉 PermitRootLogin prohabit-password
添加 PermitRootLogin yes
重启 /etc/init.d/ssh restart