root账户不允许远程登陆

有时为了特殊需求,只允许普通账户登陆Linux,而不允许root账户登陆,而普通账户登陆后,然后再su 到root下是可以的。打开sshd的配置文件
vim /etc/ssh/sshd_config 加入一行:
PermitRootLogin no
复制代码
重启sshd服务: service sshd restart
posted @ 2016-11-24 15:27  专注才能精通  阅读(413)  评论(0编辑  收藏  举报