Ubuntu 开启root用户登录

1 开启su 登录

sudo passwd root

2 ssh 登录开启

1、安装ssh 服务。

apt-get install openssh-server

2、编辑sshd 服务配置文件。

vi /etc/ssh/sshd_config

3、配置root用户能够登录操作系统。

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