Block/Restrict SSH Login with TCP Wrapper
Generally all users in LINUX can able to login to server through SSH. Here we are going to see how to block/restrict SSH login with TCP Wrapper. TCP Wrapper is used to block FTP, SSH, TELNET.
To deny/restrict/block the IP address 192.168.1.10 for SSH remote login.
#vim /etc/hosts.deny
sshd: 192.168.1.10
To deny/restrict/block the IP address Except 192.168.1.10 for SSH remote login.
#vim /etc/hosts.deny
sshd: ALL EXCEPT 192.168.1.10
To deny/restrict/block the IP address on network 192.168.1 for SSH remote login.
Here 24 & 255.255.255.0 represents 24 ON bits 11111111.11111111.11111111.00000000
And also represents that the IP address is class C
#vim /etc/hosts.deny
sshd: ALL EXCEPT 192.168.1.10/24
or
sshd: ALL EXCEPT 192.168.1.10/255.255.255.0
#vim /etc/hosts.deny
sshd: ALL






Hey! This is the fourth time visiting now and I just wanted to say I truley relish looking through your blogging site. I decided to bookmark it at stumbleupon.com with the title: Block/Restrict SSH Login with TCP Wrapper | Tobby News and your Website address: http://tobbynews.com/2011/12/blockrestrict-ssh-login-with-tcp-wrapper. I hope this is ok with you, I’m attempting to give your good blog a bit more coverage. Be back shortly.
Many thanks for being my own coach on this subject. I enjoyed your article very much and most of all preferred how you really handled the aspect I regarded as controversial. You’re always extremely kind towards readers really like me and aid me in my living. Thank you.