[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
[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