编辑ssh配置文件 vi /etc/ssh/sshd_config 找到PermitRootLogin,值修改为no PermitRootLogin no 保存重启ssh systemctl restart sshd root账号已被禁用