SSH problems (ssh_exchange_identification: read: Connection reset by peer)

13,689

Looks like I may have tracked this down to a network device no longer being sane.

Share:
13,689

Related videos on Youtube

kSiR
Author by

kSiR

Updated on September 18, 2022

Comments

  • kSiR
    kSiR over 1 year

    I was running 11.10 and decided to do the full upgrade and come up to 12.04 after the update SSH (not SSHD) is now misbehaving when attempting to connect to other OpenSSH instances. I say OpenSSH as I am running a DropBear sshd on my router and I am able to connect to it.

    When attempting to connect to an OpenSSH server

    risk@skynet:~/.ssh$ ssh -vvv risk@someserver
    OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
    debug1: Reading configuration data /home/risk/.ssh/config
    debug3: key names ok: [[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss]
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 19: Applying options for *
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to someserver [someserver] port 22.
    debug1: Connection established.
    debug1: identity file /home/risk/.ssh/id_rsa type -1
    debug1: identity file /home/risk/.ssh/id_rsa-cert type -1
    debug1: identity file /home/risk/.ssh/id_dsa type -1
    debug1: identity file /home/risk/.ssh/id_dsa-cert type -1
    debug3: Incorrect RSA1 identifier
    debug3: Could not load "/home/risk/.ssh/id_ecdsa" as a RSA1 public key
    debug1: identity file /home/risk/.ssh/id_ecdsa type 3
    debug1: Checking blacklist file /usr/share/ssh/blacklist.ECDSA-521
    debug1: Checking blacklist file /etc/ssh/blacklist.ECDSA-521
    debug1: identity file /home/risk/.ssh/id_ecdsa-cert type -1
    ssh_exchange_identification: read: Connection reset by peer
    risk@skynet:~/.ssh$
    

    DropBear instance

    risk@skynet:~/.ssh$ ssh -vvv root@darkness
    OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
    debug1: Reading configuration data /home/risk/.ssh/config
    debug3: key names ok: [[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss]
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 19: Applying options for *
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to darkness [192.168.1.1] port 22.
    debug1: Connection established.
    debug1: identity file /home/risk/.ssh/id_rsa type -1
    debug1: identity file /home/risk/.ssh/id_rsa-cert type -1
    debug1: identity file /home/risk/.ssh/id_dsa type -1
    debug1: identity file /home/risk/.ssh/id_dsa-cert type -1
    debug3: Incorrect RSA1 identifier
    debug3: Could not load "/home/risk/.ssh/id_ecdsa" as a RSA1 public key
    debug1: identity file /home/risk/.ssh/id_ecdsa type 3
    debug1: Checking blacklist file /usr/share/ssh/blacklist.ECDSA-521
    debug1: Checking blacklist file /etc/ssh/blacklist.ECDSA-521
    debug1: identity file /home/risk/.ssh/id_ecdsa-cert type -1
    debug1: Remote protocol version 2.0, remote software version dropbear_0.52
    debug1: no match: dropbear_0.52
    ...
    

    I have googled and ran most ALL fixes recommend both from the Debian and Arch sides and none of them seem to resolve my issue. Any ideas?

  • Eliah Kagan
    Eliah Kagan almost 12 years
    If your problem is solved, please accept this (i.e., your own) answer. (You were unable to do that when you first posted it, but you can accept your own answer starting 2 days after posting it.)
  • ZombieDev
    ZombieDev almost 10 years
    Also, mention what you changed with the network device to fix this.
  • Chev_603
    Chev_603 about 9 years
    I am also having problems with ecdsa keys and get this "debug3: Could not load "/home/risk/.ssh/id_ecdsa" as a RSA1 public key" message. What the heck?
  • kSiR
    kSiR about 9 years
    Yea no... it was a issue with routers and packets not getting sent the same way every time.