设置linux远程使用root账户

Posted 千里之行_始于足下

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了设置linux远程使用root账户相关的知识,希望对你有一定的参考价值。

为root账户设置密码

sudo passwd root

切换到root账户

su root

允许远程root账户连接linux

vi /etc/ssh/sshd_config

#PermitRootLogin prohibit-password //注释此行
PermitRootLogin yes //加入此行

//重启服务
service ssh restart

以上是关于设置linux远程使用root账户的主要内容,如果未能解决你的问题,请参考以下文章