How to avoid “Server unexpectedly closed network connection” error

Author/Source: Admin
284 views
Published on: 2020-01-19
Updated on:2022-01-17 13:20:23
Bug Fixes Tutorial Admin


Before you start reading your Post, heres a reminder

SeaofApps is Equipped with a Powerful Software Search Assistant

Type in your desired software/App in the searchbar below and
it will crawl the internet for direct download sites that have it in seconds

Want to know more...


To avoid “Server unexpectedly closed network connection” error when trying to login to your server with ssh via putty (screenshot below),


you need to enable TCP Keepalives and adjust sending of null packets to keep session active.

To do this, you simply need to follow the following steps:

  • ⦁ Start by loading your profile (If you have one),
  • ⦁ If you dont have one you can create one by following the following steps:
    • -Open putty
    • -Under "Host Name"= input your IP address (e.g 123.43.5.211 ), under "Port"= input your server port (e.g 22 ) Note: default is usually set at 22 unless you changed it, under "Saved Session"= input the name your profile will be saved as (e.g test )
    • -On the right side of the interface click "save"
    • -Your profile is now saved
    • -Now, under "Saved Session" click your newly created session
    • -click "load" on the right side of the interface
    • -Now you have created and loaded your profile.


  • ⦁ Navigating to the Connection menu on the left side, and Click it (For those new to putty its easy, simply click "connection" in the menu on the left)
  • ⦁ 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 (I personally use 30 to be safe).
  • ⦁ 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. To save your changes
    • -navigating to the Session menu on the left side, and Click it (For those new to putty its easy, simply click "session" in the menu on the left)
    • -Now click "save" button
  • ⦁ You can now click "open" to login to your server
Rating AVG: 5.0000

3