阿里云CentOS7服务器/etc/hosts.allow限制访问IP
1、编辑配置文件
vi /etc/hosts.allow
2、添加IP限制
sshd:172.18.*.*:allow
sshd:all:deny
3、重启SSH
/bin/systemctl restart sshd.service
阿里云CentOS7服务器/etc/hosts.allow限制访问IP
1、编辑配置文件
vi /etc/hosts.allow
2、添加IP限制
sshd:172.18.*.*:allow
sshd:all:deny
3、重启SSH
/bin/systemctl restart sshd.service