- vim /etc/hosts.allow
- 加入你允许访问你主机的IP
- sshd:192.168.10.88:allow
- 据说支持 192.168.1.0/24 这种掩码的写法,但是我测试了不行,写成 192.168.1.* 是可以的
- 加入你允许访问你主机的IP
- vim /etc/hosts.deny
- sshd:ALL:deny
- sshd:ALL:deny
详细解决方案
SSH限制IP登录
热度:93 发布时间:2024-01-16 21:20:31.0
相关解决方案