Question

ssh_exchange_identification: Connection closed by remote host

  • Posted September 1, 2013

I did few steps for the gunicorn and nginx. Everything was fine, but, then i again tried to login into vps by ssh then i get following errors.

ssh_exchange_identification: Connection closed by remote host

Now, i can’t login into digitalocean vpn to change /etc/hosts.deny

Further, i tried from the browser based terminal access then its wired that i can’t type “/” as my keyboard is not in english format.

Help is appreciated!

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Log in to your droplet via the console and run these commands: <br> <br><pre>ssh-keygen -t dsa -N “” -f /etc/ssh/ssh_host_dsa_key <br>ssh-keygen -t rsa -N “” -f /etc/ssh/ssh_host_rsa_key <br>ssh-keygen -t ecdsa -N “” -f /etc/ssh/ssh_host_ecdsa_key</pre> <br>if that doesn’t work (i.e. you still can’t type /), try running this command instead: <br> <br><pre>dpkg-reconfigure openssh-server</pre>

Log in to your droplet via the console and run these commands: <br> <br><pre>ssh-keygen -t dsa -N “” -f /etc/ssh/ssh_host_dsa_key <br>ssh-keygen -t rsa -N “” -f /etc/ssh/ssh_host_rsa_key <br>ssh-keygen -t ecdsa -N “” -f /etc/ssh/ssh_host_ecdsa_key</pre> <br>if that doesn’t work (i.e. you still can’t type /), try running this command instead: <br> <br><pre>dpkg-reconfigure openssh-server</pre>

After creating self signed cert, using this tutorial : https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-nginx-in-ubuntu-18-04 . i have tried all the solutions presented and i still get same error ‘ssh_exchange_identification: read: Connection reset by peer’

@kamal thank you it is fixed i can connect to ssh <br> <br>thank you soo much

@kamal i can’t type “” in DO vnc my keyboard is azerty