3
debug1: Connection established.
debug1: identity file /home/DAMS/.ssh/id_rsa type 1
debug1: identity file /home/DAMS/.ssh/id_rsa-cert type -1
debug1: identity file /home/DAMS/.ssh/id_dsa type -1
debug1: identity file /home/DAMS/.ssh/id_dsa-cert type -1
ssh_exchange_identification: Connection closed by remote host

Hello, this one is different. Nothing missing or anything. I am using cygwin and it just stops when I do git push production on my server. This is usually ok, but I wonder why it is stopping connections.

0

7 Answers 7

2

I still don't understand the issue, but this worked for me:

echo "sshd:ALL" >> /etc/hosts.allow 

Depending on your system, you may need to sudo this.

1

Another possibility is that the server is using tcp wrappers and your IP is not whitelisted.

0

You can start sshd in debug mode on your server to find out what's actually going wrong, but I have a pretty good feeling that your problem is that either your ~/.ssh directory or your ~/.ssh/authorized_keys file is world-readable on the server.

4
  • what should i do then ?
    – user51684
    Dec 16, 2010 at 4:00
  • btw there is no dir ~/.ssh or ~/.ssh authorized key. but yesterday it allwork fine.
    – user51684
    Dec 16, 2010 at 5:36
  • bash: /root/.ssh/authorized_keys: No such file or directory
    – user51684
    Dec 16, 2010 at 5:37
  • authorized_keys2 Dec 26, 2012 at 11:27
0

likely cannot write to /var/ area for process accounting. check for full or readonly file systems on the host system.

1
  • how can i do that ? on my server ?
    – user51684
    Dec 16, 2010 at 5:24
0

If you are using shared keys it looks like either:

  1. you haven't specified the correct private key; or
  2. your public key is (no longer?) in your server's authorized_keys file; or
  3. as jgoldshrafe suggests, the permissions on your authorized_keys file is incorre
0

The error suggests that the connection was closed during the initial negotiation. I would guess that if you telnet to the server on port 22 that the connection is accepted and then closed again straight away?

0

You can get "ssh_exchange_identification: Connection closed by remote host" if your sshd service is not operational!

If you have access to the server check you have the sshd service running with:

  ps aux | grep ssh

and check it is listening on port 22:

 netstat -plant | grep :22

more details here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .