Ubuntu使用root用户登录

1.使用普通用户给root添加密码

sudo passwd root

Ubuntu使用root用户登录_第1张图片

2.登录到root账户

3.编辑sshd_config文件

修改 PermitRootLogin 字段为 yes,保存并退出

vi /etc/ssh/sshd_config
....
#PermitRootLogin prohibit-password
PermitRootLogin yes
....

4.重启ssh服务

systemctl restart sshd

5.尝试远程连接即可

你可能感兴趣的:(Ubuntu,ubuntu,linux,运维)