-
确保安装了OpenSSH服务器,未安装使用下面命令
sudo apt install openssh-server
-
设置root密码
sudo passwd root
-
修改SSH配置文件,在PermitRootLogin prohibit-password这一行,添加一行PermitRootLogin yes
vim /etc/ssh/sshd_config PermitRootLogin yes

-
保存退出后,重启SSH服务
sudo systemctl restart ssh
sudo apt install openssh-server
sudo passwd root
vim /etc/ssh/sshd_config PermitRootLogin yes

sudo systemctl restart ssh
评论