CentOS 7 默认容许任何帐号透过 ssh 登入,包括 root 和一般帐号,为了不让 root 帐号被黑客暴力入侵,我们必须禁止 root 帐号的 ssh 功能,事实上 root 也没有必要 ssh 登入服务器,因为只要使用 su 或 sudo (当然需要输入 root 的密码) 普通帐号便可以拥有 root 的权限. vim /etc/ssh/sshd_config #PermitRootLogin yes 修改为: PermitRootLogin no 重新启动 sshd: syst…