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