How to disable ssh access to specific Ip address
Posted: Wed Sep 19, 2012 2:13 pm
How to restrict ssh access to specific Ip address
USING host.allow file
If its setup correct and when you try to access ssh from an external Ip you will get the error below :
USING host.allow file
Scroll down to the bottom of the file and addvi /etc/hosts.allow
Save and exit and ssh will be accessible only from the specified IPs.sshd : 65.25.68.86 : allow
sshd : 287.49.180.9 : allow
sshd : ALL : deny
If its setup correct and when you try to access ssh from an external Ip you will get the error below :
ssh_exchange_identification: Connection closed by remote host