Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using a small embedded linux setup generated by buildroot to run on a x86 device. It was generated to use busybox init system and also runs dropbear so I can ssh into the device.

I wanted to block the ssh access so I went to edit the `/etc/hosts.deny' file. It did not exist so I created it with the following content


and rebooted. I expected it to block any attempts to ssh into it but to my surprise I found that I could still do so.

I have tried to find further details about this but I have come to the conclusion that the buildroot system is not configured to use this file. My question is about what applications on a linux system actually read the contents of /etc/hosts.deny and act upon it. I have read the man pages but I cannot find anything that tells me this. Is it possible that this is just incompatible approach to the buildroot generated system?? Or is there something wrong with the content of the file?

share|improve this question
hosts.allow and hosts.deny are used by the TCP wrappers mechanism (services maintained by inetd or the equivalent daemon on your system ). sshd doesn't use TCP wrappers, so /etc/hosts.{allow,deny} don't apply to it. – Alexios Dec 23 '13 at 15:00
@Alexios Thanks for your reply. If you post this as an answer I will accept it. – mathematician1975 Jan 3 '14 at 14:28
Thing is, my comment is flat out wrong. The sshd in OpenSSH does use TCP wrappers (any process can on a voluntary basis, not just those started by tcpd). The manpage says so too. Since this is an embedded system, are you using Dropbear SSH instead of OpenSSH? – Alexios Jan 4 '14 at 8:12
@Alexios Yes I use Dropbear on my system. – mathematician1975 Jan 6 '14 at 10:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.