Problem:

My PuTTY connection becomes inactive, thereby requiring me to reconnect to the server and login again.

Background & Analysis:

How to identify an inactive PuTTY connection? When you cannot type anything in your PuTTY window and you see "(inactive)" in your PuTTY window’s title bar, it means that your connection is inactive (has been dropped by the server).

Why does a PuTTY connection become inactive? Connections use resources like cpu and memory on the client and server. When a server determines that your session is idle (you have not used it for a pre-defined interval), it will drop your connection. This is done to protect the server (and network components) against a build-up of several redundant connections that could affect performance.

Solution:

In order to prevent the server from dropping your PuTTY connection and making it inactive, your PuTTY client must send packets to the server even when you’re not using it. Given below are steps to do this:

STEP 1: Modify Connection options

Go to PuTTY Configuration –> Connection and set the "seconds between keepalives" to a non-zero value. This ensures that your PuTTY client sends NULL packets to the server regularly. If you do not know the idle session timeout defined on your server, then choose a small value for the "seconds between keepalives". The value you select must be less than the idle session timeout of your server for PuTTY to keep your connection active. The default value is 0 which tells PuTTY not to bother about keeping the connection alive. Refer the picture below:

putty_inactive_fig1

STEP 2: Save your PuTTY configuration

Saving your PuTTY session is not the most obvious feature of PuTTY as there’s no SAVE button on every configuration window. So, after completing STEP 1, you must go to the Session window and click the "Save" button. refer the picture below:

putty_inactive_fig2

Root Cause:

My PuTTy connection became inactive because my PuTTY client was not sending "keepalive" packets to the server to prevent the connection from becoming idle and consequently, the server dropped the connection.

NOTE:

(1) The solution above describes a successful problem-solving experience and may not be applicable to other problems with similar symptoms.

(2) Your rating of this post will be much appreciated. Also, feel free to leave comments.

 

VN:F [1.9.22_1171]
Rating: +30 (from 38 votes)

Tagged with:

Filed under: Application Software

Like this post? Subscribe to my RSS feed and get loads more!