Operating System - Tru64 Unix
1753477 Members
4536 Online
108794 Solutions
New Discussion юеВ

Re: 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 4
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!!