Preventing Idle in telnet

Dik T. Winter dik at cwi.nl
Wed Sep 26 09:49:27 AEST 1990


In article <24593 at adm.BRL.MIL> aeba-im-o-e2 at berlin-emh1.army.mil ( Kendrick Gibson) writes:
 > Should an idle keyboard be reason to automatically log a
 > user out?
 > 
 > Is there a better way for the Sys Ad to determine whether a user
 > is really idle?  
 > 
This is all based on a few assumptions that are all wrong:

1.  If there is no input during some time the user is idle.
What about long compiles, long downloads?
2.  If there is coninuous input the user is not idle.
Case in fact, some time ago when a logged in remotely to a system the phone
line generated enough noise to let the system not drop the connection while
I was not even at home.

No, there really is no way to determine whether a user is idle or not.
Checking input fails (see above), checking output fails also (in case two
above the system generated quite a lot of error messages on the noise).
Also, checking output can easily be spoofed.

Back to the original question.  I had the same problem with a system that
would disconnect me after only 5 minutes of 'idle' time.  I patched up a
private version of telnet.  The sources for telnet are available by
anonymous ftp from uunet.uu.net (bsd-sources/network/telnet.tar.Z).
It is easy to modify the sources to output every few minutes a single
character (I did use a null byte).  (see alarm(3)).  If you do not have
a BSD system it might be more difficult, because all networking might
be done differently.  If you have any problems feel free to ask.
--
dik t. winter, cwi, amsterdam, nederland
dik at cwi.nl



More information about the Comp.unix.questions mailing list