Thursday, October 04, 2012

How to restrict ssh login by ip address

SSH restriction can be accomplished in below two files.

1.    /etc/hosts.allow

Example:
sshd: 1.2.3.0/255.255.255.0  sshd: 192.168.0.0/255.255.255.0

2.    /etc/hosts.deny

Example:
sshd: ALL

The access control software consults the above two files.   Search stops at the first match.

1 comment:


  1. Thank you very much for your information.
    Australia ETA/eVisitor Visa
    is quiet easy to apply online from Singapore,
    Malaysia, United Kingdom, United States, Canada, France and including all others ETA Eligible Countries from our website.

    ReplyDelete