Operating System - HP-UX
1830646 Members
3154 Online
110015 Solutions
New Discussion

Telnet session to HP-UX box times out.

 
Tan Shirley
Frequent Advisor

Telnet session to HP-UX box times out.

Hi,

I encountered a problem whereby my telnet session times out.
If I were to telnet into my HP-UX v11.00 box and leave the telnet session idle for about an hour or so, and when I hit or try to type any command, the telnet session will end and the telnet window just goes off.

I do not encounter this problem with my other HP-UX boxes. I was suspecting that could it be some kernel parameters which needs to be fine tuned? Please help !! As this is getting irritating when the telnet session times out and you do not recall where you left off. You have to re-establish the telnet session and login again.

Please help as it's pretty urgent. Thanks a million to whoever answered my question. Thanks so much !
10 REPLIES 10
RikTytgat
Honored Contributor

Re: Telnet session to HP-UX box times out.

Hi,

There is a shell environment variable that makes the shell quit after a certain number of seconds of inactivity. The name of the variable is TMOUT.


Hope this helps,
Rik.
RikTytgat
Honored Contributor

Re: Telnet session to HP-UX box times out.

Hi,

I forgot to say how to solve your problem: you should unset it (unset TMOUT) or set it to 0 (export TMOUT=0).

Bye,
Rik.
John Palmer
Honored Contributor

Re: Telnet session to HP-UX box times out.

Hi,

If TMOUT is your problem then the shell should output a warning message before logging you out.

If you don't receive a message then it is possible that the disconnection is being done by some 'third party' comms box.

Do you connect directly to the server or through some sort of firewall or proxy server. If the latter, it's possible that this may be disconnecting you.

Regards,
John
Tan Shirley
Frequent Advisor

Re: Telnet session to HP-UX box times out.

Hi Rik Tytgat,

Thanks for your quick response.
Where can I set the TMOUT? In which file?

Please advise. Thanks !

Tan Shirley
Frequent Advisor

Re: Telnet session to HP-UX box times out.

Hi John Palmer,

Thanks for your reply. The problem is, my UNIX box is in the sam segment as my workstation. So it should not have gone thru' the firewall.
Any other solutions which you might think of?
Thanks !
Andreas Voss
Honored Contributor

Re: Telnet session to HP-UX box times out.

Hi,

TMOUT can be set in /etc/profile or in the users home directory at $HOME/.profile

Regards
Victor BERRIDGE
Honored Contributor

Re: Telnet session to HP-UX box times out.

Anrdeas,
Can you double check for me, as I have a case where TMOUT has been set in /etc/profile (as for all connections) on a machine (HPUX11), I have just tried using unset TMOUT and export TMOUT=0, it still clears the connection... and so doesnt solves Tan's problem if she were to keep the timeout for others

Best regards
Victor
Devbinder Singh Marway
Valued Contributor

Re: Telnet session to HP-UX box times out.

Have a look at the tcp keepalive settings
default is 2hours . See document Id S1100002433B / or do a search for keepalive
under technical docs / manuals.
Seek and you shall find
John Palmer
Honored Contributor

Re: Telnet session to HP-UX box times out.

Victor,

Your problem was due to the fact that you 'unset' TMOUT. If you do that then the shell retains the old value and any subsequent assignments are ignored for timeout purposes.

The man page for sh-posix states:-

Unsetting _, ERRNO, LINENO, MAILCHECK, OPTARG, OPTIND, RANDOM, SECONDS, and TMOUT removes their special meaning, even if they are subsequently assigned to.

Regards
John
Victor BERRIDGE
Honored Contributor

Re: Telnet session to HP-UX box times out.

Thanks John!
Yes I started with unset in .profile, then at 2nd test I did manually a export TMOUT=0...

So unset TMOUT isnt a good option...

Best of all
Victor