Operating System - HP-UX
1830865 Members
2638 Online
110017 Solutions
New Discussion

Timeout Period for Telnet

 
Sathyaswarupa
Contributor

Timeout Period for Telnet

How to set timeout period for telnet?
6 REPLIES 6
Arunvijai_4
Honored Contributor

Re: Timeout Period for Telnet

# export TMOUT=

Export TMOUT variable in any user's profile to activate session timeout.

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

Re: Timeout Period for Telnet

Use TMOUT variable setting in profile files. Use it specifically else

If you set TMOUT variable with value in .profile then it will be activated all logins including ssh based, rlogin based too.

To avoid that,

---- $HOME/.profile ---

ps | grep -q telnet
if [[ ${?} -eq 0 ]]
then
# 1 hour
export TMOUT=3600
fi

-Muthu
Easy to suggest when don't know about the problem!
Adisuria Wangsadinata_1
Honored Contributor

Re: Timeout Period for Telnet

Hi,

Check the url below (docID : KBRC00012873) about 'What parameter controls telnet timeouts?' :

http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000069216208

Hope this information can help you.

Cheers,
AW
now working, next not working ... that's unix
Sivakumar TS
Honored Contributor

Re: Timeout Period for Telnet

Hi,

Please go thru this,

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

HtH,

Siva.
Nothing is Impossible !
Bill Hassell
Honored Contributor

Re: Timeout Period for Telnet

telnet doesn't have a timeout. Instead, telnet typically connects to a login process which then connects to a shell (specified in /etc/passwd). So the shell is where you may be able to set a timeout. For standard shells (POSIX shells like /usr/bin/sh and /usr/bin/ksh as well as the Bourne shell: /usr/old/bin/sh), set the variable TMOUT in seconds of inactivity. For /usr/bin/csh, the variable autologout is set to minutes of inactivity. If other shells are used, you'll have to refer to the man page (or the programmer if shell is a custom program or script).

Now it's important to note that the shell does not monitor inactivity of subprocesses such as vi. Once a process is started from the shell, the shell is no longer running and cannot compute inactivity. Only when the shell prompt is on the screen will inactivity be measured.


Bill Hassell, sysadmin
Nguyen Anh Tien
Honored Contributor

Re: Timeout Period for Telnet

1,vi ~.profile
#add this line
export TMOUT=
2,save and exit
3,logout and login again
HP is simple