linux 限制或允许root通过ssh登录

两步:

第一步,vim /etc/ssh/sshd_config 找到PermitRootLogin并修改对应的值为yes或no

第二步,重启ssd服务,service sshd restart

至于该文件/etc/ssh/sshd_config中每个字段的含义可以通过该命令查看:man sshd_config

猜你喜欢

转载自dongwei.iteye.com/blog/1419919