请教下大家,在linux如何设置ROOT用户不能远程SSH登入,但是可以通过SSH普通用户SU登入ROOT

如题所述

修改/etc/ssh/sshd_config(sshd_config不一定在这个路径,但是你自己在/etc找一下)

PermitRootLogin yes 改为 PermitRootLogin no
相关安全选项:
PermitEmptyPasswords 是否允许空密码登录,PermitEmptyPasswords yes如果你的root是空密码就可以用空密码登陆了。
PasswordAuthentication 配置是否使用口令验证。
/etc/init.d/ssh stop && /etc/init.d/ssh start
温馨提示:答案为网友推荐,仅供参考
第1个回答  2011-04-01
在/etc/ssh/sshd_config文件中有一行配置:
permitrootlogin
设置为no就可以了。
相似回答