CentOS 7 禁止root账户ssh登录

[root@localhost ~]# cat /etc/redhat-release 

CentOS Linux release 7.4.1708 (Core) 

[root@localhost ~]# ssh -V
OpenSSH_6.6.1p1, OpenSSL 1.0.1e-fips 11 Feb 2013

vim /etc/ssh/sshd_config

PermitRootLogin yes更改为no

重启ssh 

systemctl restart sshd


你可能感兴趣的:(CentOS 7 禁止root账户ssh登录)