Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Operating System - Tru64 Unix
cancel
Showing results for 
Search instead for 
Did you mean: 

Telnet Timeout

Bruce eley_1
Occasional Advisor

Telnet Timeout

Just wondering if it is possible to define a telnet timeout for inactivity? I have users that have remote telnet sessions that either forget to logout or they have certain screens open that cause our WMS program to hang. It would be nice if this could be set to automatically log the session out after a certain period of inactivity. Any ideas?
4 REPLIES
Ivan Ferreira
Honored Contributor

Re: Telnet Timeout

There is an environment variable called TMOUT that will logoff a user after reach the inactivity time specified in the variable, but this is only if the user has a shell open.

If not, then you should wirte a script that takes the output of the "w" command to identify the "idle" time.

Based in that output, you get the tty, then you can kill the process listed by ps -t .
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Bruce eley_1
Occasional Advisor

Re: Telnet Timeout

Are there any good resources out there to help with writing the script? Sorry, kinda new to Tru64
Ivan Ferreira
Honored Contributor

Re: Telnet Timeout

This link can give you some tips:

http://open.itworld.com/5040/nls_unix_idlelogons060629/page_1.html
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Bruce eley_1
Occasional Advisor

Re: Telnet Timeout

Thanks for the link!!