Telnet sessions time out after 15 minutes

General support questions including new installations
Post Reply
turk77
Posts: 4
Joined: 2008/04/17 18:55:01
Contact:

Telnet sessions time out after 15 minutes

Post by turk77 » 2008/04/17 19:12:30

I've been working on this for a few weeks with no luck.

Any telnet sessions to our server running CentOS 4 timeout (disconnect) after exactly 15 minutes of inactivity. I can get around this by running ping commands in a separate window on the particular PC to keep the connection alive, but I need a better solution.

It looks like this is a common problem with Linux and Telnet, but I haven't found a viable solution. I enabled "keepalive" in the httpd.conf file, but that didn't make a difference. I also read where others had success with various scripts, but I haven't found anything that will work with CentOS. I know in RedHat, someone resolved the timeout issue by enabling keepalive and then running the echo command (echo 100 > /proc/sys/net/ipv4/tcp_keepalive_time).


Does anyone have any other suggestions?

Thanks!!!!
Todd K

markske
Posts: 77
Joined: 2007/03/19 10:12:59
Location: Belgium/brussels

Re: Telnet sessions time out after 15 minutes

Post by markske » 2008/04/17 19:20:17

why don't you use ssh?

with telnet everybody who can sniff(wireshark or somthing) can read your password in clear text!

turk77
Posts: 4
Joined: 2008/04/17 18:55:01
Contact:

Re: Telnet sessions time out after 15 minutes

Post by turk77 » 2008/04/17 19:54:09

Hi Mario,

I just tried connecting via SSH and it still disconnected after 15 minutes. I guess it isn't only Telnet, but just simple "inactivity." You're right, though, we should be using SSH. Unfortunately, we have a lot of dumb terminals that Telnet into the server via older Digi C/Con Concentrators and they aren't capable of SSH connections.

Any other suggestions?

Thanks!
Todd K

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Telnet sessions time out after 15 minutes

Post by gerald_clark » 2008/04/17 20:08:21

You might want to check your routers.
They might have a timeout set.

turk77
Posts: 4
Joined: 2008/04/17 18:55:01
Contact:

Re: Telnet sessions time out after 15 minutes

Post by turk77 » 2008/04/17 20:13:14

I did check the routers and all of the timeout settings look good (sorry for not posting that info).

There is another server in the network with RedHat, and no one ever gets disconnected from that one. Therefore, I am assuming it has something to do with the CentOS server settings.

Thanks!
Todd K

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Telnet sessions time out after 15 minutes

Post by gerald_clark » 2008/04/17 20:57:34

Well, I just telnetted into a 4.6 system.
No timeout after 20 minutes.

turk77
Posts: 4
Joined: 2008/04/17 18:55:01
Contact:

Re: Telnet sessions time out after 15 minutes

Post by turk77 » 2008/04/17 21:27:40

Hi Gerald,

Wanna swap servers?? jk.

I can only assume that your "keepalive" (or other settings) are different. If you Google "Linux 15 minute timeout" you'll see a bunch of posts. 15 minutes seems to be the magic number that people are experiencing for timeouts with various versions of Linux. I'm sure I am missing something simple.

I guess I just need to figure out how to make that "keepalive" setting work.

Thanks,
Todd K

markske
Posts: 77
Joined: 2007/03/19 10:12:59
Location: Belgium/brussels

Re: Telnet sessions time out after 15 minutes

Post by markske » 2008/04/18 07:02:52

I have sessions running idle for more than one day,

I think you should check first your logs for any errors or warnings
if that is ok, then you should check your network in detail

duplicate ip, duplicat mac, broken port on the switch ....

cormander
Posts: 100
Joined: 2005/05/16 21:27:57
Location: Utah
Contact:

Re: Telnet sessions time out after 15 minutes

Post by cormander » 2008/04/18 13:02:20

If you have putty, one of the options under "Connection" in the settings is "Seconds between keepalives". Set this to 60 or something, then ssh (or telnet) in, and sit idle. If after 15/20 mins of idle time the connection still works, its probably a network configuration on your router.

Post Reply

Return to “CentOS 4 - General Support”