运营笔记 - 限制root远程登录的方法

57 阅读1分钟

方法一 修改 /etc/ssh/sshd_config

将 PermitRootLogin 设置为 no

方法二 修改 /etc/hosts.allow 或 /etc/hosts.deny

  • 在 /etc/hosts.allow 可设置运行哪些IP登录
  • 在 /etc/hosts.deny 可设置禁止哪些IP登录