vi +/PermitRootLogin /etc/ssh/sshd_config
#PermitRootLogin yes
PermitRootLogin no
systemctl restart sshd
基本原理