Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

But I am getting the following error:

ssh_exchange_identification: read: Connection reset by peer

I executing the following command:

sudo ssh root@example.net

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

share|improve this question

migrated from stackoverflow.com 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

3 Answers 3

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 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

Your Answer

 
discard

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