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 . no missing or anything. im using cygwin. and it just stop when im doing git push production on my server. usually its ok, but i dont know why its stop connections

i wonder whats wrong.

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.

| improve this answer | |
1

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

| improve this answer | |
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.

| improve this answer | |
  • what should i do then ? – user51684 Dec 16 '10 at 4:00
  • btw there is no dir ~/.ssh or ~/.ssh authorized key. but yesterday it allwork fine. – user51684 Dec 16 '10 at 5:36
  • bash: /root/.ssh/authorized_keys: No such file or directory – user51684 Dec 16 '10 at 5:37
  • authorized_keys2 – Zayne S Halsall Dec 26 '12 at 11:27
0

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

| improve this answer | |
  • how can i do that ? on my server ? – user51684 Dec 16 '10 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
| improve this answer | |
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?

| improve this answer | |
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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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