Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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
OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 178.xxx.xxx.xxx [178.xxx.xxx.xxx] port 22.
debug1: Connection established.
debug1: identity file /home/orangetux/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/orangetux/.ssh/id_rsa-cert type -1
debug1: identity file /home/orangetux/.ssh/id_dsa type -1
debug1: identity file /home/orangetux/.ssh/id_dsa-cert type -1
debug1: identity file /home/orangetux/.ssh/id_ecdsa type -1
debug1: identity file /home/orangetux/.ssh/id_ecdsa-cert type -1
ssh_exchange_identification: Connection closed by remote host

Via an admin panel I can access the logs and I see:

Mar  8 20:32:10 vmi11458 sshd[2334]: Set /proc/self/oom_adj to 0
Mar  8 20:32:10 vmi11458 sshd[2334]: refused connect from 82.xxx.xxx.xxx (82.xxx.xxx.xxx)

I've stopped the DenyHosts service. But I still cannot log in. How can I solve this?

share|improve this question
up vote 5 down vote accepted

By stopping the denyhosts service, you prevent new entries from being created in /etc/hosts.deny, but entries that are already there remain. You will need manually remove the IP from the hosts.deny folder. To prevent the IP from being added again, you need to whitelist it in the allowed-hosts file.

share|improve this answer

To debug this issue, check the following things:

  1. Please double-check that the permission of your .ssh directory 700 and permissions of your .ssh/authorized_keys file must be 600.

  2. Check the logs /var/secure/logs for knowing reason of connection close.

share|improve this answer
I've checked that already. The problem was that my IP appeared in the host.deny – OrangeTux Mar 8 '13 at 20:06

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.