Super User is a question and answer site for computer enthusiasts and power users. 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

But I am getting the following error:

ssh_exchange_identification: read: Connection reset by peer

I executing the following command:

sudo ssh

Can this be due to somekind of firewall settings or because the server is overlaoded?

share|improve this question

migrated from Jun 29 '11 at 19:08

This question came from our site for professional and enthusiast programmers.

You don't need to sudo to ssh to another box as root, just ssh root@where-ever from your current id. You only need sudo if you're using key exchange as the root user. Also, never ssh into a box as root. Having said all that - try ssh -v -v -v root@whatever and see if you get any meaningful output (-v makes it more verbose). – EightBitTony Jun 29 '11 at 19:14
Have you specifically enabled root logins over SSH? I know they're disabled in Ubuntu, and you really shouldn't be logging in as root via SSH anyways. – Darth Android Jun 29 '11 at 19:21

It's likely a firewall issue, I can connect fine from here (it asks me for a password).

Please do not use sudo ssh, just ssh is fine. Also, disable passwordbased authentication and use keybased auth if possible.

To diagnose problems, run ssh with the -v option (-vvv for maximum verbosity):

ssh -vvv user@host
share|improve this answer

This is the message you'll see when there are two machines using the same IP address.

share|improve this answer
confirmed, I had a byobu session that I detached from, tried ssh'ing back into the server and got blocked. setup a proxy to get a different IP address, ran ssh again and voila. Thanks @John Schmitt – user34112 Mar 5 '14 at 23:07
  • try ssh -vvv
  • (re)moving your .ssh/config to let's say /tmp and try ssh again
  • try regenerating your keys (client then server)
  • try to ssh from same box to same box just for test
  • temporary disable your firewall
share|improve this answer

You must log in to answer this question.