LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-19-2005, 03:49 PM   #1
rhelpm
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.

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

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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
rhelpm
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 >


-Prasad.
 
Old 11-25-2005, 01:56 AM   #4
bharaniks
Member
 
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
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
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:
Code:
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
Code:
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)

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

OR

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
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:16 PM.

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