Setting telnetd timeout for a remote session

Hello,

Under QNX 4.24, we would like to be able to set a timeout on a telnet
session from a remote machine to the QNX machine (the QNX machine being the
host).

Basically, we would like to terminate the telnet session if it is idle for a
certain period of time (for example 10minutes), in the same way ftp sessions
are terminated.

I looked on QNX web site and in the newsgroups and didn’t find anything
except the keepalive option. However, this keepalive option seems to detect
only lost connections and not idle connections.

Any suggestions?

Regards

Alain

You can monitor the amount of time the “telnetd” program uses to see if
anything is going on.
If you issue the command “sin -Ptelnetd ti” you will see the “UTIME” and
“STIME” increase
as the users enters commands into thier telnet session. If they do nothing
these values will not
change. You can use the “qnx_psinfo” request from a program to monitor
“telnetd” time
usage and slay it when it is inactive for some period of time.

“Alain Boyer” <aboyer@broadtel.com> wrote in message
news:a77l09$pcb$1@inn.qnx.com

Hello,

Under QNX 4.24, we would like to be able to set a timeout on a telnet
session from a remote machine to the QNX machine (the QNX machine being
the
host).

Basically, we would like to terminate the telnet session if it is idle for
a
certain period of time (for example 10minutes), in the same way ftp
sessions
are terminated.

I looked on QNX web site and in the newsgroups and didn’t find anything
except the keepalive option. However, this keepalive option seems to
detect
only lost connections and not idle connections.

Any suggestions?

Regards

Alain

“Ivan Bannon” <ivan.bannon@rjginc.com> wrote in
news:a7as5n$8ln$1@inn.qnx.com:

You can monitor the amount of time the “telnetd” program uses to see if
anything is going on.
If you issue the command “sin -Ptelnetd ti” you will see the “UTIME”
and “STIME” increase
as the users enters commands into thier telnet session. If they do
nothing these values will not
change. You can use the “qnx_psinfo” request from a program to monitor
“telnetd” time
usage and slay it when it is inactive for some period of time.

I don’t think that’s very accurate description of what stime and utime is.
What if the telnetd program sits blocked on a select() but times out, does
some clean up and then re-select()s? utime is still going to increase non?

Your best bet, might be to port a version of telnetd (with that feature).
Either you can implement it or find one that contains it. Or you might be
able to use netstat info to determine if you should kill the telnetd if
packets aren’t moving… but again… highly inaccurate.



\

Cheers,
Adam

QNX Software Systems Ltd.
[ amallory@qnx.com ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <pschon@baste.magibox.net>