修改配置文件

Text
vi /etc/ssh/sshd_config
#PermitRootLogin yes
改为
PermitRootLogin no #改为禁用root登录

重启ssh服务

Text
systemctl restart sshd.service