ubuntu14.04 ssh允许root用户远程登录

2019-11-18 18:06:40 5290

 修改 root 密码

sudo passwd root

2. 以其他账户登录,通过 sudo nano 修改 /etc/ssh/sshd_config :

xxx@ubuntu14:~$ su - root
Password:
root@ubuntu14:~# vi /etc/ssh/sshd_config

3. 注释掉 #PermitRootLogin without-password,添加 PermitRootLogin ye

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

4. 重启 ssh  服务

root@ubuntu14:~# sudo service ssh restart
ssh stop/waiting
ssh start/running, process 1499
root@ubuntu14:~#


提交成功!非常感谢您的反馈,我们会继续努力做到更好!

这条文档是否有帮助解决问题?

非常抱歉未能帮助到您。为了给您提供更好的服务,我们很需要您进一步的反馈信息:

在文档使用中是否遇到以下问题: