本页面只读。您可以查看源文件,但不能更改它。如果您觉得这是系统错误,请联系管理员。 ====== sshd-config常见配置 ====== ===== 只允许特定的用户从某个网段访问root ===== 默认情况下,root是不允许密码直接登陆的,我们可以特殊配置 /etc/ssh/sshd_config 文件让特定的ip可以访问root。 <code bash> Match Address 192.168.100.0/24,192.168.1.0/24,你的客户端IP PermitRootLogin yes PasswordAuthentication yes </code> 然后执行 <code bash> sudo sshd -t # 检查语法,没有输出就是正常的 sudo systemctl restart ssh </code>