x

1.安装ssh

sudo apt install openssh-server

2.允许root用户远程登录

su vi /etc/ssh/sshd_config


找到PermitRootLogin 位置修改成如下。重启ssh

# Authentication:
LoginGraceTime 120
#PermitRootLogin without-password
PermitRootLogin yes
StrictModes yes

设置root登录账号密码

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。