1.开始使用 Ubuntu的时候,root用户是不能使用的,因为root没有被激活打开。所以需要激活打开。
2.激活,操作步骤:
# 使用当前用户 ubuntu登录
ubuntu@xxxxx:~$
#设置root的密码
sudo passwd root
# 输入密码
new password:xxxxx
# 再次输入密码
retype new passwrod:xxxx
# 切换root账号
su root
# 文件设置
vim /etc/ssh/sshd_config
# 添加以下内容
# 在#PermitRootLogin prohibit-password 下面添加两行:
PermitRootLogin yes
PasswordAuthentication yes
# 生效
service ssh restart