默认安装Ubuntu都是不允许以root用户进行登录的,想要以root用户进行登录需要进行一些操作,主要是以下几个步骤:
sudo su
# 在 sshd_config 文件里的 “Authentication” 部分修改以下内容
vim /etc/ssh/sshd_config
PermitRootLogin yes
# 完成以后退出 vim 并保存
# 重启 ssh 服务以应用更改
service sshd restart
# 直接修改 Root 用户的密码
passwd root
#这样重新登陆 ssh 就可以用 Root 登陆了。
文章评论