# ldd `which sshd` | grep -i libwrap
or
# strings `which sshd` | grep -i libwrap
Both the commands should echo out libwrap.so.0 which would mean hosts_access can be used for service sshd.
Make sure you are able to connect to ssh, add your IP to "/etc/hosts.allow". In the below case I am using the full range of my local intranet (LAN).
# Allow localhost
ALL: 127.
# Allow LAN
sshd: 192.168.
Now to block ssh access to others, simply add the below lines to "/etc/hosts.deny".
# Block everyone else from SSH
sshd: ALL
Note: hosts.allow takes precedence over hosts.deny.
0 comments:
Post a Comment