Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to change session timeouts

Status
Not open for further replies.

linuxteer

Programmer
Jul 9, 2003
1
GB
Hi all,

I use putty to connect with ssh to a linux server (redhat 8.0). If I remain idle for more than 5 mins then the seesion is timed out. How can I change the default timeouts on redhat 8.0? Can I do that from one of the files in /proc ? or do I have have to recompile the kernel?
Much appreciated if someone could shed some light on this.

Ash
 
Might try the following:

cat /proc/sys/net/ipv4/tcp_keepalive_time

If that file exists, it probably has the value "300" which is 300 seconds which is 5 minutes. If this is the case, you could change that value to something like 2 hours (7200 seconds) by:

echo 7200 > /proc/sys/net/ipv4/tcp_keepalive_time

Then edit the /etc/ssh/sshd_config to make sure the "KeepAlive" is set to "yes"; if not change it, save the changes, and restart sshd.
 

Or look for the shell variable TMOUT.

Cheers

Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top