Strovent SystemsSign in
Reference

Telnet echo, typed characters twice, missing or visible passwords

How the Telnet ECHO and SUPPRESS-GO-AHEAD options decide who shows your typing, and why characters appear twice, not at all, or in the clear.

In a Telnet session something has to put your typing on the screen. Either your client draws each key itself (local echo), or the host sends each character back (remote echo). The Telnet ECHO option, defined in RFC 857, is how the two sides agree.

How ECHO works

  • IAC WILL ECHO, sent by the host, means: "I will echo the characters you send me."
  • IAC DO ECHO is the client's answer that it accepts.
  • IAC WON'T ECHO or IAC DON'T ECHO turns it off.

With no negotiation, the default is no echo over the connection: RFC 857 says each direction starts out as WON'T ECHO and DON'T ECHO. The RFC explains that, in highly interactive use, it is appropriate for the remote process to control the way characters are echoed. It also says the option does not control whether an end echoes for itself. That is up to each system, which may take the state of the echo negotiation into account.

SUPPRESS-GO-AHEAD

The original Telnet is half duplex: a sender passes the turn with a Go Ahead (GA) signal. RFC 858 defines the SUPPRESS-GO-AHEAD option so that a full-duplex connection does not have to carry GA. RFC 857 notes that ECHO alone is normally not enough for character-at-a-time remote echo: SUPPRESS-GO-AHEAD normally has to be used together with it.

What goes wrong

  • Every key appears twice: The client echoes locally, and the host also echoes. Turn off local echo in the client.
  • A password is visible as you type: Your client is showing what you type itself, and no host echo took over, or the host does not echo this prompt at all. With remote echo, the host decides what to send back, so it can send nothing for a password. Turn off local echo, if the client has a setting for it.
  • Nothing appears as you type: Neither side is echoing: the host has not taken over echo, and local echo is off. Turn local echo on, or use a host that negotiates ECHO.
  • The session shows odd or repeated characters: Both ends are echoing for the other. RFC 857 warns that if both hosts echo each other's characters, they bounce between them indefinitely, and tells implementations to prevent it.

Telnet is not encrypted

Whatever is displayed, a Telnet password crosses the network as typed. Hiding it on the screen does not encrypt it. For a host that offers it, use SSH instead: see Telnet basics and Mosh or SSH?.

The VT Telnet session in this app accepts the host's ECHO and Suppress-Go-Ahead options.

Sources

Spotted a mistake? Email [email protected].