Report this

What is the reason for this report?

SSH error: Connection closed by host port 22

Posted on September 20, 2017

I got this error when trying to connect to the server using ssh

$ ssh -vvv user@ip OpenSSH_7.4p1, LibreSSL 2.5.0 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 20: Applying options for * debug2: resolving “128.199.240.57” port 22 debug2: ssh_connect_direct: needpriv 0 debug1: Connecting to 128.199.240.57 [128.199.240.57] port 22. debug1: Connection established. debug1: identity file /Users/{myusername]/.ssh/id_rsa type 1 debug1: key_load_public: No such file or directory debug1: identity file /Users//{myusername]/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users//{myusername]/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users//{myusername]/.ssh/id_dsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users//{myusername]/.ssh/id_ecdsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users//{myusername]/.ssh/id_ecdsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users//{myusername]/.ssh/id_ed25519 type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users//{myusername]/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.4 debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.2 debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.2 pat OpenSSH* compat 0x04000000 debug2: fd 3 setting O_NONBLOCK debug1: Authenticating to 128.199.240.57:22 as ‘/{myusername]’ debug3: hostkeys_foreach: reading file “/Users//{myusername]/.ssh/known_hosts” debug3: record_hostkey: found key type ECDSA in file /Users//{myusername]/.ssh/known_hosts:4 debug3: load_hostkeys: loaded 1 keys from 128.199.240.57 debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521 debug3: send packet: type 20 debug1: SSH2_MSG_KEXINIT sent Connection closed by 128.199.240.57 port 22

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.