Last updated on January 3rd, 2023 at 11:59 am

When I connect to my linux / unix server using putty it timeouts after sometime automatically. Basically this happens when I do other task while keeping the putty session idle, during this time it popup an error sometimes stating that the session has timeout.

This is very annoying especially when I am running a script / command that takes longer time than usual to complete, and getting the connection cancelled automatically during that time might end up in major errors within the script.

How to keep alive the sessions without timeout ?

Here is the simple step by step instruction with screenshot.

Step 1 – Modify Keepalives

Open your putty software and click on CONNECTIONS in the left menu sidebar.

putty_timeout_step1

On the right pane you can see an option “Sending of null packets to keep session active“, under that there is a input field that has the “Seconds between keepalives” and by default it will be 0 that means this option is turned off. Change that to 1


Step 2
– Save Session

Click on the Session category on the left menu and you should be able to see your saved session.

Note: If you are using default settings, then save that by highlighting it. Just in case if have a custom session name then click or highlight that and save the changes

putty_timeout_step2

You are done. Now you can open your putty session and connect to the server, it will not get timeout due to inactivity.


Leave a Reply

Your email address will not be published. Required fields are marked *