Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can I configure telnet session to time out after 30 mins

Status
Not open for further replies.

kahn630

Technical User
Mar 10, 2005
29
US
how can I configure telnet session to time out after 30 mins. Thanks
 
Put TMOUT=1800 (ie 30 * n60 seconds)

in .profile or /etc/profile for global application.
 
I have put TMOUT=1800;export TMOUT in the /etc/profile, put it does not work, by the way the root default shell is sh. but I wana every one including root to terminate the session after setting idle for 1800 seconds. thank for the help.
 
I don't think TMOUT is available in sh, so you'll either have to switch to ksh (which I know isn't adviseable in terms of system recovery for example) or bash. I guess another option is to write your own script to find out who's been idle for > 30 minutes using the finger idle column as the basis. My script at faq822-1270 though not exactly what you wanr, might give you some ideas.
 
in AIX you have also to setup the TIMEOUT variable with the same value of TMOUT ... perhaps it works
 
I have just put this (succesfully) into my .profile as
"export TMOUT=1800" (Thanks Ken) although
env command shows a strange output. But it must go in every user .profile. I didn't bother with root.
Or type it in at the command prompt, you could test it with a low value.
 
@kahn

this timeout does not depend on the telnet itself but it is a shell feature; sh does not have this feature but ksh, bash, csh and tcsh (other's may have this, too)

Best Regards, Franz
--
Solaris System Manager from Munich, Germany
I used to work for Sun Microsystems Support (EMEA) for 5 years
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top