Home > Archives > Centos Deny Root

Centos Deny Root

Publish:

[root@localhost ~]# vim /etc/ssh/sshd_config

#PermitRootLogin yes


# Example of overriding settings on a per-user basis
#Match User anoncvs
#       X11Forwarding no
#       AllowTcpForwarding no
#       PermitTTY no
#       ForceCommand cvs server
DenyUsers root

[root@localhost ~]# systemctl restart sshd.service

声明: 本文采用 BY-NC-SA 授权。转载请注明转自: Ding Bao Guo