Hi everyone, I have got the next notification “Server unexpectedly closed network connection” when I tried to connect to my server. I tried to solve it using recommendation from this topic https://www.digitalocean.com/community/questions/putty-gives-server-unexpectedly-closed-network-connection-why but not solved it and still can’t to connect.
Please, write information about How to Solve it. Thank you in advance!
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.
Click below to sign up and get $100 of credit to try our products over 60 days!
Hi @mslobodian1962,
A PuTTY session left idle will disconnect at a time determined by the host server. Try enabling keep-alives in PuTTY. This causes PuTTY to send null SSH packets to the remote host periodically, preventing the session from timing out.
The PuTTY client can be configured to always establish a connection which will not time out due to inactivity. To create and save a new keep-alive connection, follow these steps:
If your connected sessions still time out, enter a lower number of seconds into the “Seconds between keepalives” value.
If this doesn’t help, try using your Recovery Console and allow your IP through the firewall to SSH to your Droplet.