ssh_exchange_identification: Connection closed by remote host

Published on August 15, 2006 and tagged with debian  problem

Today, as I tried to access a server with SSH, I got the following error:

ssh_exchange_identification: Connection closed by remote host

After some searching I found a solution: I have had to add the following line to /etc/hosts.allow:

ssh: 0.0.0.0/0.0.0.0

And voilà, it works.

3 comments baked

  • MJR/slef August 15, 2006 at 17:11

    Warning: that line will allow SSH access from any IPv4 address and there are a lot of scanners out there (machines which just try to guess logins with brute force). If you can, only put hosts, domains or networks which you want to have SSH access in there.

  • cakebaker August 16, 2006 at 07:57

    @MJR/slef: Thanks for the warning, I changed it. Is it also an issue if a NAT device is used?

  • MJR/slef August 16, 2006 at 08:59

    A NAT device can limit your checks: you can either allow or disallow connections which appear to be from the NAT device. Then again, most NAT devices I have seen can do firewalling too, so that’s not a major problem. Just another place to set access control…

Bake a comment




(for code please use <code>...</code> [no escaping necessary])

© daniel hofstetter. Licensed under a Creative Commons License