Home > Archives > Centos Deny Root

Centos Deny Root

Publish:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
[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