Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 10-19-2005, 03:49 PM   #1
LQ Newbie
Registered: Oct 2005
Posts: 4

Rep: Reputation: 0
idle session timeouts

All my telnet or SSH IDLE connections from my win XP client machine to linux servers are being timed out. Is there some setting at the server level that needs to be configured properly so that the sessions stay open.

uname -a
Linux rac2 2.4.21-20.0.1.ELsmp #1 SMP Wed Nov 24 20:34:01 EST 2004 i686 i686 i386 GNU/Linux

Any help is appreciated.

Old 10-19-2005, 04:02 PM   #2
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,945
Blog Entries: 14

Rep: Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163
Check to see if TMOUT variable is set to anything other than 0:

Open a ssh or telnet session
Type "echo $TMOUT"

If you get a numeric value for above that is greater than 0 then that's your issue. You'd have to find what was turning on TMOUT (a line like TMOUT= ...). Likely candidates are /etc/profile for global or .profile or .bashrc for user specific.
Old 10-19-2005, 04:12 PM   #3
LQ Newbie
Registered: Oct 2005
Posts: 4

Original Poster
Rep: Reputation: 0
It returned nothing...

rac2 | aol2 | /home/oracle > echo $TMOUT

rac2 | aol2 | /home/oracle >

Old 11-25-2005, 01:56 AM   #4
Registered: May 2005
Distribution: Red Hat Linux
Posts: 36

Rep: Reputation: 15
Thankyou Guys !!!!

By reading your posts i have achived my requirement.

Thanks a lot for your posts !!!!
Old 11-25-2005, 03:46 AM   #5
Senior Member
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
Do you have a firewall on the transit link?

Usually stateful firewall add a connection in their table and set a timeout on it (30minutes.., so that no connection stays for years).
Everytime a byte is sent , the connection is updated and the timeout set back to 30mn.
When the timeout arrives at 0, the connection is removed and no more traffic is allowed.

In tcp exist a mechanism for knowing when a connection is broken ( one of the two have disconnected whithout telling the other)
. This mechanism is KEEP_ALIVE and can be set on TCP sockets.

I guess you have to :
-> tell SSH to use KEEP_ALIVE in his sockets:
KeepAlive yes
in sshd_config
-> lower the keepalive of your server to a value inferior to the timeout of your firewall. Here I put 300seconds
echo "300" > /proc/sys/net/ipv4/tcp_keepalive_time
This assumes that the firewall takes this keepalive packets (ack) as normal traffic and refreshes the connection timeout (this is dependent on the fw implementation)

in your firewall configuration, increase the timeout for ssh connection to a value higher than /proc/sys/net/ipv4/tcp_keepalive_time


use an app that constantly refreshes the screen: X window tunneled in ssh , xterm with a clock,...

I would be interested by your result because I have the same issue at work but I'm not the sshd administrator, so I use X forwarding.

Hope it helps


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
sendmail timeouts lehmm Linux - Networking 0 09-27-2005 01:54 AM
logout gnome if the session is idle? yenonn Linux - Newbie 0 10-07-2004 12:35 AM
How to kill a session in "pts/0" idle for 209d? (Redhat-9) francio Linux - Newbie 2 07-28-2004 05:54 PM
wuftp session timeouts fatgod Linux - General 2 03-21-2002 11:16 AM
Network session timeouts with Linux router codebunny Linux - Networking 0 02-12-2002 11:38 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:58 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration