Preventing SSH timeouts

Posted on December 11th, 2009 by David Luhman and tagged , , .

Depending on the environment you're working in, you may be automatically logged out from a server by SSH timeouts. Here are a few things you can do to help prevent these timeouts :

Add or modify the following in your /etc/ssh/sshd_config file :

ClientAliveInterval 28800
ClientAliveCountMax 28800

In your ~/.bashrc file, set the TMOUT parameter to something longer. For example :

export TMOUT=28800

On your client (PuTTY) set the seconds between keepalives to something like 30.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options