PuTTY gives "Server unexpectedly closed network connection ....why?

When i am connecting digital ocean server using putty i am getting error like server unexpectedly closed network connection. How can i solve this . Plz help.


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.


You may want to try enabling TCP Keepalives under the Connection menu for PuTTy. Start by loading your profile, navigating to the Connection menu on the left side, and under Low-level TCP, click on “Enable TCP Keepalives.”

You’ll also need to adjust the first option, the “Sending of null packets to keep session active.”

Try changing that to 10, 20, or 30 (which is in seconds).

For the changes to stick, you’ll need to save your profile once these changes have been made, else you’ll have to do this before you attempt to login each time.

What IP and port are you using? Did you try using the console in your DO panel?