ssh_exchange_identification: read: Connection reset by peer

May 24, 2019 336 views
Security Ubuntu 16.04

I keep having this issue, I have restarted the server already and still has this issue I used ssh --v and this is my log

OpenSSH7.8p1, LibreSSL 2.7.3
debug1: Reading configuration data /Users/anazodosomto/.ssh/config
debug1: /Users/anazodosomto/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh
config
debug1: /etc/ssh/sshconfig line 48: Applying options for *
debug2: resolve
canonicalize: hostname 68.183.227.27 is address
debug2: sshconnectdirect
debug1: Connecting to 68.183.227.27 [68.183.227.27] port 22.
debug1: Connection established.
debug1: identity file /Users/anazodosomto/.ssh/idrsa type 0
debug1: identity file /Users/anazodosomto/.ssh/id
rsa-cert type -1
debug1: identity file /Users/anazodosomto/.ssh/iddsa type -1
debug1: identity file /Users/anazodosomto/.ssh/id
dsa-cert type -1
debug1: identity file /Users/anazodosomto/.ssh/idecdsa type -1
debug1: identity file /Users/anazodosomto/.ssh/id
ecdsa-cert type -1
debug1: identity file /Users/anazodosomto/.ssh/ided25519 type -1
debug1: identity file /Users/anazodosomto/.ssh/id
ed25519-cert type -1
debug1: identity file /Users/anazodosomto/.ssh/idxmss type -1
debug1: identity file /Users/anazodosomto/.ssh/id
xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH7.8
ssh
exchange_identification: read: Connection reset by peer

please help

1 Answer

Hello,

I would recommend trying the following, login as root via the digital ocean console and set more strict permissions to your authorized_keys file:

chmod 700 /root/.ssh
chmod 600 /root/.ssh/authorized_keys

Then try to access the server via SSH again.

Hope that this helps!
Bobby

Have another answer? Share your knowledge.