Skip to content

Ubuntu 设置root账号

首先使用Ubuntu登录

用远程工具连接 Ubuntu

然后添加并设置root密码

shell
sudo passwd root

然后修改ssh配置

shell
sudo vi /etc/ssh/sshd_config

修改

在#PermitRootLogin prohibit-password下添加 

PermitRootLogin yes
PasswordAuthentication yes

图片

重启ssh服务

重启ssh服务

shell
sudo service ssh restart