Server Fault is a question and answer site for system and network administrators. 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

Whenever I log into my Linux server using SSH, I get this error:

ssh_exchange_identification: Connection closed by remote host

How do I fix this?

share|improve this question
I dont know which OS you use but it looks like an firewall Problem. Can you please give additional informations? – Dennis Wisnia Dec 30 '11 at 15:59

I would also double check iptables by "sudo iptables -L" to make sure ssh (port 22) isn't blocked.

share|improve this answer
Highly unlikely as socket has been opened successfully but closed shortly for whatever reason. – Sergei Dec 31 '11 at 10:04

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.