How to prevent connections from closing after a while in PuTTY

 


How to prevent connections from closing after a while in PuTTY

How to prevent connections from closing after a while in PuTTY

As someone that has to code on a project, then update the changes on the production server, change some configuration on the server remotely via SSH, i know how tedious it is when the SSH connection via PuTTY gets interrupted and suddenly it isn't available anymore, showing the error "PuTTY Fatal Error, Network Error: Software caused connection abort", so you need to connect once again, providing your password manually if you don't use PageAnt.

To solve this problem all i had to do was to enable the TCP Keepalives and increase the seconds between the keepalives like this. As first, start the PuTTY application and load your connection session:

PuTTY Load Session Connection

Then go to the Connection node of the treeview, in this view under "Sending of null packets to keep session active", in the Seconds between keepalives, type 30 and check the Enable TCP Keepalives (SO Keepalive option):

It's worth to mention that keepalives are not always helpful, for example, they will help you if you have a firewall that drops your connection after an idle time, but, if the network between you and the server breaks in connectivity, then the keepalives can actually make the things worse. The will be no issue only, if the session is idle and the connectivity is temporarily lost between both endpoints, but the connectivity is restored before both sides try to send any kind of information.

Keepalives are only supported in Telnet and SSH; the Rlogin and Raw protocols offer no way of implementing them.

Happy coding ❤️!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章