[comp.protocols.tcp-ip] Closing a Telnet session - exit or new Login:

chas@sfc.Wichita.NCR.COM (Charles Binford) (06/28/90)

I login to a unix host from my PC with telnet, finish what I'm doing, 
type ^d to logout, and then..... sometimes my session closes and
I'm back to my DOS prompt OR sometimes I get the Unix Login: banner
again.  WHY?   Usually a given host / pc telnet package will perform the
same way.  I have two different hosts with the same TCP package configured
the same way (as far as I can tell) that act different when using the same
pc package.

Any ideas?
-- 
Charles Binford, Automation Engineering, NCR PPD Wichita
    <C.Binford@Wichita.NCR.COM>
    <uunet!ncrlnk!ncrwic!c.binford>

syd@DSI.COM (Syd Weinstein) (06/29/90)

chas@sfc.Wichita.NCR.COM (Charles Binford) writes:
>I login to a unix host from my PC with telnet, finish what I'm doing, 
>type ^d to logout, and then..... sometimes my session closes and
>I'm back to my DOS prompt OR sometimes I get the Unix Login: banner
>again.  WHY?   Usually a given host / pc telnet package will perform the
>same way.  I have two different hosts with the same TCP package configured
>the same way (as far as I can tell) that act different when using the same
>pc package.
This is an easy one (I going to regret that :-))

On Unix via modem whether you get a closed port/hangup
or another login depends on the setting of hupcl in the stty parameters.
If hupcl is set, the port is hung up on the last close (logout),
otherwise it is just recycled, and a new login is posted.
Some systems, the getty is programed to override this and close the
port itself as the getty starts, but, mostly this controls things.

If the TCP/IP login emulates a serial line in the system you connect to,
then the same rules apply for closing it, and whether or not a new
getty is forked or the port closed.

If the TCP/IP does not use waiting ports and getty, then generally
it just closes it on logout to reassign the port.

If you want to force logout to close the connection, just set
hupcl on the stty.  The opposite may keep it open with a new login
or may not depending on how the site has implimented TCP/IP and login
access over TCP/IP.
-- 
=====================================================================
Sydney S. Weinstein, CDP, CCP                   Elm Coordinator
Datacomp Systems, Inc.                          Voice: (215) 947-9900
syd@DSI.COM or dsinc!syd                        FAX:   (215) 938-0235

henry@zoo.toronto.edu (Henry Spencer) (06/30/90)

In article <691@sfc.Wichita.NCR.COM> chas@sfc.Wichita.NCR.COM (Charles Binford) writes:
>I login to a unix host from my PC with telnet, finish what I'm doing, 
>type ^d to logout, and then..... sometimes my session closes and
>I'm back to my DOS prompt OR sometimes I get the Unix Login: banner
>again.  WHY?  ...

It is up to the host whether it tries to hang up the line when a user
signs off.  Some don't.  Some do.  Some do, but only if no processes
remain on the line (i.e. if you started something in the background,
or news/mail/etc did so on your behalf, no hangup).  This could easily
depend on details of the telnet daemon, the pseudo-tty implementation,
and the login command, to name just three.
-- 
"Either NFS must be scrapped or NFS    | Henry Spencer at U of Toronto Zoology
must be changed."  -John K. Ousterhout |  henry@zoo.toronto.edu   utzoo!henry