不允许Root登陆的方法如下:vim /etc/ssh/sshd_config把PermitRootLogin yes改成:PermitRootLogin no然后重启sshd服务:Service sshd restart这样用户就不能用root远程登陆了。