Monday 20 October 2014

How do I configure inactivity timeout for PuTTy client

Recently, I got flummoxed by the error - "Network error: Connection timed out" for my PuTTy client and finally, solved the issue after a bit of google search. If you happen to be in similar situation, the following set of instructions can be used to set in-activity timeout for PuTTy client.

  1. Open PuTTy application windows and navigate to the Options panel.
  2. Select Connection
  3. On right side of the panel, you will see option fields such as "Sending of null packets to keep sesssion active", "Low-level TCP connection options" etc.
  4. In the field - "Sending null packets to keep session active", change the default value from 0 to say, 1800 (30 minutes)
  5. Also, Check the Enable TCP keepalives (SO_KEEPALIVE option) check box. This option may not be available in the older versions of the PuTTY client.
  6. Then, select Session from the left hand menu.
    1. For all new sessions:
      1. Select "Default settings" in "Load,save or delete a stored sessions pane"
      2. Select "Save"   
    2. For a new session with a particular host:
      1. In the Host Name (or IP Address) field, enter the destination hostname.
      2. In the Saved Sessions box enter a name for the session.
      3. Select Save
If you have access to the server, you can configure ClientAliveInterval, TCPKeepAlive and ClientAliveCountMax options in the ssh configuration file which normally resides in /etc/ssh/sshd_config

ClientAliveInterval 30
TCPKeepAlive yes
ClientAliveCountMax 99999

Do not forget to restart the SSH server for the changes to take effect.

# /etc/init.d/sshd restart

No comments:

Post a Comment