Reputation: 11649
At my organisation we've set up a linux server which runs one of our sites. It's been working fine and I have been able to SSH through into it (using Terminal on OSX) no problem.
As of earlier when I tried to ssh [email protected]
(not my real IP) I was rejected with: ssh_exchange_identification: Connection closed by remote host
Having a look at the /etc/hosts.deny
file I can see: sshd: 123.123.123.123
in the list.
This means the IP which I have been using for months no problem has suddenly appeared in the list. I removed it, and was able to SSH in fine, ONCE, then on my second try I was rejected and looking at the list again, I can see we have been added to the list once more!
I have added our IP to the hosts.allow file, but no luck - still no access.
Why do IP's appear in the hosts.deny
file?
How can I stop our IP appearing there?
Upvotes: 2
Views: 2902
Reputation: 393134
As mentioned, probably a fail2ban
or similar (look for denyhosts
too - another popular).
The usual fix is to append your IP address to /etc/hosts.allow
This works for denyhosts at least
Upvotes: 4
Reputation: 1541
You may have a system like fail2ban installed which adds you to the hosts.deny file if you enter your password incorrectly a few times..
Upvotes: 2