有时为了特殊需求,只允许普通账户登陆Linux,而不允许root账户登陆,而普通账户登陆后,然后再su 到root下是可以的。打开sshd的配置文件
vim /etc/ssh/sshd_config 加入一行:
PermitRootLogin without-password
重启sshd服务: service sshd restart
有时为了特殊需求,只允许普通账户登陆Linux,而不允许root账户登陆,而普通账户登陆后,然后再su 到root下是可以的。打开sshd的配置文件
vim /etc/ssh/sshd_config 加入一行:
PermitRootLogin without-password
重启sshd服务: service sshd restart