一、修改root用户名密码
ubuntu@VM-0-11-ubuntu:~$ sudo passwd root
New password:
Retype new password:
passwd: password updated successfully
ubuntu@VM-0-11-ubuntu:~$ su - root
Password:
root@VM-0-11-ubuntu:~#
二、使能root用户ssh功能
root@VM-0-11-ubuntu:~# vi /etc/ssh/sshd_config
#LoginGraceTime 2m
#PermitRootLogin prohibit-password
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10