moneyslow.com

ssh 允许禁止ip处理流程:

1 /etc/hosts.allow-

1 if allow will not check 2

2 if not found then go to 2

2 /etc/hosts.deny .

2 if not found allow access.

 

以下例子是只允许 192.168的c段访问ssh,其他deny:

 

[root@localhost etc]# more hosts.allow

sshd:192.168.0.0/255.255.255.0

 

[root@localhost etc]# more hosts.deny

sshd:ALL

Exit mobile version