Operating System - HP-UX
1856511 Members
30080 Online
104113 Solutions
New Discussion

automatic Kill telnet session that is not used

 
SOLVED
Go to solution
david_974
Contributor

automatic Kill telnet session that is not used

Hi,
Please, any can tell me how i can do to aumatically kill a telnet session that is no used after some minutes by the user?
or how i can do to control this?

Thanks,
David
8 REPLIES 8
Arunvijai_4
Honored Contributor

Re: automatic Kill telnet session that is not used

Hi David,

Check this thread out

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=606819

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Mark Greene_1
Honored Contributor

Re: automatic Kill telnet session that is not used

If using ksh, you can set the TMOUT variable in the .profile. See man ksh for more info.

There is also a tcp parameter called keepalive for this very purpose. See man ndd on how to set it, and ndd -h support for a complete list of settings.

mark
the future will be a lot like now, only later
Peter Godron
Honored Contributor

Re: automatic Kill telnet session that is not used

David,
as suggested TMOUT can be set in the /etc/profile.
Also if do a
TMOUT=100
readonly TMOUT
export TMOUT
This sets the TMOUT variable to readonly, so users can't override.
But I think this timeout only applies whilst sitteing in a shell, if the user starts a vi session, I don't think they get timed out.

Arun,
your link refers to users accounts that have not be used for a time.Maybe wrong link?
David_711
Frequent Advisor

Re: automatic Kill telnet session that is not used

The TMOUT variable, work on the SH shell??
Peter Godron
Honored Contributor
Solution

Re: automatic Kill telnet session that is not used

David,
I think :
csh - autologout
ksh - TMOUT
bash - TMOUT
Posix - TMOUT

So it should work, but I think root may be excempt from the timeout.
Bill Hassell
Honored Contributor

Re: automatic Kill telnet session that is not used

Yes, TMOUT is the value for POSIX shells which includes sh (/usr/bin/sh), ksh and optional shells like bash. csh is not a POSIX shell and uses the autologout variable. In ALL shells, this timeoout value is for a shell prompt only. The timer starts when the shell waits for a command and is reset whenever anotherf command (like vi) is run. The shell cannot determine if a user has walked away leaving vi running. That takes a sysadmin to check.


Bill Hassell, sysadmin
Peter Godron
Honored Contributor

Re: automatic Kill telnet session that is not used

David,
are you happy with the answers you got?

If so have a look at:
http://forums1.itrc.hp.com/service/forums/helptips.do?#28

and/or
can you please update.
david_974
Contributor

Re: automatic Kill telnet session that is not used

Yes
Thank you.
How i can assig points to you?