设置允许的IP段
# vim /etc/hosts.allow最后一行加入
sshd:192.168.1.*:allow
设置不允许的IP段
# vim /etc/hosts.deny最后一行加入:
sshd:ALL
最后重启生效
service sshd restart
设置允许的IP段
# vim /etc/hosts.allow最后一行加入
sshd:192.168.1.*:allow
设置不允许的IP段
# vim /etc/hosts.deny最后一行加入:
sshd:ALL
最后重启生效
service sshd restart