Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 May 2000 23:56 EDT
From:      Barney Wolff <barney@databus.com>
To:        freebsd-net@freebsd.org
Subject:   Re: socket programming
Message-ID:  <391cd7e80.3e9@databus.databus.com>

next in thread | raw e-mail | index | archive | help
Well, telnet is a funny protocol.  Both answers have been wrong.
The telnet echo mode controls whether a telnet peer will echo
*back along the tcp connection* not, as one might think, to
the screen.  So the way to tell the telnet client to stop echoing
to the user is to send IAC WILL ECHO (255,251,1).  The client,
seeing that the server wants to echo, should reply IAC DO ECHO
(255,253,1) and stop echoing itself.  The server, in this case,
lies, because it really is not going to echo.  To avoid a race
condition, do all this before sending the password prompt.  You
don't have to wait for the client's do-echo, but you do have to
avoid taking it as part of the password.

The above assumes that it is the telnet client that is doing the
echoing, of course.  If it's the server, then just stop.  For
example, in the customary case of logging into a shell on a
remote host, it's the server host that's echoing, not the client.

And if the client is not a real telnet client, but some custom
program that doesn't understand the telnet protocol, you're sunk.

Barney Wolff  <barney@databus.com>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?391cd7e80.3e9>