I have been connecting to a remote server through my Mac for about a month now. As of recent though, I tried to connect using ssh dylan@MY_IP and got this message.
ssh_exchange_identification: read: Connection reset by peer
I also got some diagnostic information...
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 53: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to {MY IP{ [MY IP] port 22.
debug1: Connection established.
debug1: identity file /Users/watson/.ssh/id_rsa type -1
debug1: identity file /Users/watson/.ssh/id_rsa-cert type -1
debug3: Incorrect RSA1 identifier
debug3: Could not load "/Users/watson/.ssh/id_dsa" as a RSA1 public key
debug1: identity file /Users/watson/.ssh/id_dsa type 2
debug1: identity file /Users/watson/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
After doing some research, I tried the following...
- Restarted my router
- Cleared my "known_hosts" file
- Deleted my "known_hosts" file
- Released & Renewed my DHCP
- I've also tried from another device (Windows) using Putty with an error as well
Note that I haven't made any changes to the server to inhibit this communication.
Also, I'm not sure if this would cause issues, but I have connected to it by it's domain name as well as it's IP.
In addition, I was able to successfully connect from another IP address.
I know this is a large issue with many resources out there, but a lot of the solutions did not work nor did I really see any type of resolution for anyone.
Update
I forced it to protocol 1. Instead of "Connection reset by peer", I now get "Connection closed by remote host". Running it with debug information revealed:
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 53: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to MY_IP [MY_IP] port 22.
debug1: Connection established.
debug1: identity file /Users/watson/.ssh/identity type -1
debug1: identity file /Users/watson/.ssh/identity-cert type -1
ssh_exchange_identification: Connection closed by remote host
/Users/watson/.ssh/id_dsa
? Try to backup the file and remove it.ssh -1 ...