I don't understand why this question was closed without answer, and getting 4 down voted?

I want to use tcp wrapper to disable ssh remote login from a client on the server. How do I find out if sshd supports tcp wrapper and hence use it to disable ssh login?

How to disable ssh remote login using tcp wrapper

closed as unclear what you're asking by Tom Hunt, cuonglm, Scott, chaos, Archemar Dec 2 '15 at 8:17

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

I wanted to answer it, however since it's already been closed, I can't do that. Anyway, here is the answer.

A TCP wrapped service is one that has been compiled against the libwrap.a library. Use the ldd command to determine whether a network service is linked to libwrap.a. The following example determines the absolute path name of the sshd service, and then lists the shared libraries linked to the sshd service, using the grep command to search for the libwrap library:


[root@localhost ~]# whereis sshd
sshd: /usr/sbin/sshd /usr/share/man/man8/sshd.8.gz
[root@localhost ~]# 

[root@localhost ~]# ldd /usr/sbin/sshd | grep libwrap
        libwrap.so.0 => /lib64/libwrap.so.0 (0x00007f506b6e2000)
[root@localhost ~]# 

If the file is not supported, you won't be able to see libwrap via ldd command. Example

[root@localhost ~]# ldd /usr/sbin/sshd | grep libwrap
[root@localhost ~]# 

Initially, I was able to ssh to this box (

user@PC02:~$ ssh [email protected]
[email protected]'s password: 
[root@PC01 ~]# 

To block SSH access from PC02 (, just edit /etc/hosts.deny file on PC01 ( as follow.

[root@PC01 ~]# cat /etc/hosts.deny 
sshd :
[root@PC01 ~]# 

Then, If you try to access it again ...

user@PC02:~$ ssh
ssh_exchange_identification: read: Connection reset by peer

I hope this answer will help Mercy E and other users.

I'm new here and having the same problem too. E.g. my post here was down voted without any explanation, no comment, no answer ... nothing ...

Let's make stackexchange and stackoverflow more welcoming as mentioned by Jay Hanlon in his blog post here.


  • 1
    You should re-post the question and add your answer as a new post. In its actual state, your "question" is going to be closed.
    – dr_
    May 8, 2018 at 8:38

2 Answers 2


After looking at that question, it would seem that the reason it received so many downvotes is that it was originally very unclear – and the question was closed for that reason.

After it was closed, the OP edited the question so that it’s much clearer and more specific. They then self-answered their question, which is usually fine but in this case, the answer was wrong and did not answer (the post-edited version of) the question (also, going by the comments, the OP still did not seem to be clear about what they were asking about). See the full time-line of activity for the question.

Since you’ve posted this meta question, somebody else nominated that old question (from 2015) to be re-opened and I’ve added my vote to theirs. If three other users with more than 3,000 reputation add their vote, the question will be re-opened. However, I agree with dr01 and think it would be better if you were to ask a brand new question – and then answer the new question, yourself. This would be more beneficial to future users who might be interested in the answer to this question.

For what it’s worth, I’ve upvoted your own question: not out of sympathy or to compensate for the downvote – but because you’ve clearly shown that you made the effort to research and solve the problem yourself. I can’t think why it would have been down-voted (other than the voter did not consider it to be useful) but less than 20 people had looked at it before I did – and presumably most of the viewers knew as little about Tiny Core Linux as I do.

  • I'm quite surprised, I think it does answer the question. Both aspects of the edited question. The "only" problem I see with the answer is that it's unreliable and very likely wrong (with our geniuses not even managing to point out the unreliability). Refer lwn.net/Articles/609847 ... so there's a fairly cromulent point there in the second part of the original question. I don't think you've got the sequence right either. The answer was posted at 2:50 Dec 2, the question was closed at 8:17 Dec 2.
    – sourcejedi
    Jun 5, 2018 at 18:19
  • (1) Anthony Geoghegan: While I agree that Sabrina has described and documented her question clearly and coherently, I see no evidence that she has “made the effort to research and solve the problem” herself.   (2) Well, of course the How to disable ssh remote login using tcp wrapper question wasn’t answered after it was closed — that would be impossible (unless the question was closed, re-opened, and closed again, which it wasn’t).   It was answered, then closed, and then edited. Jun 8, 2018 at 23:38

It's an old question, by a user who hasn't visited the site in two years. Its original version was hard to understand, it was closed and then edited to a different question, and it has a single answer which doesn't answer either the original or the edited version. The asker didn't seem to know what they wanted, so it's doubtful what answer would have helped them. At this point, ideally, that thread would have been deleted, and I've now voted to delete it.

You, on the other hand, have a clear problem and a clear solution. Please contribute it by asking and answering your own question!

  • 1
    @Sabrina Here's how to do it: 1) Post a question copying or paraphrasing the original question you linked. 2) Post an answer containing the text you posted here originally. 3) Accept your answer so that readers will know it's a problem that has been solved. 4) Enjoy the upvotes :)
    – dr_
    May 8, 2018 at 12:48
  • I have down-voted this because I don't understand why the existing answer is not considered to answer the updated question. The "only" problem I see with the answer is that it's unreliable and very likely wrong (with our geniuses not even managing to point out the unreliability part). Refer lwn.net/Articles/609847 . I tried a quick search and didn't find an existing QA explaining this, it seems a pity to lose the opportunity.
    – sourcejedi
    Jun 5, 2018 at 18:36
  • @sourcejedi Well, ok, if you stare at the wording I suppose you could say it claims to answer the edited question, since it states “It will give you a list of services supported by tcp wrapper”. But this is wrong: /etc/hosts.allow can at best give a list of services that tcpwrapper will act on if the service supports it. So it doesn't actually answer the question “How do I find out if sshd supports tcp wrapper”. If you think you have an interesting answer to contribute, you'd be better off asking your own question. Jun 5, 2018 at 22:21

You must log in to answer this question.