How Telnet works

What Telnet is

Understand Telnet as a protocol for bidirectional terminal communication, not only as the command that opens a TCP connection.

Telnet is a protocol for sending characters between a terminal and a program on a remote computer, in both directions, over TCP. It is one of the oldest protocols still in use on the internet. The current specification, RFC 854, dates to 1983, and the idea is older than that.

Here is the problem it solved. You sit at a terminal in one place. The computer you want to use lives somewhere else. Telnet carries your keystrokes to that machine and brings its output back to your screen.

The word Telnet also names the client programs that implement the protocol. On most systems that program is literally called telnet:

telnet 192.0.2.20

This double meaning causes a lot of confusion, so let’s settle it now. You can use a Telnet client to connect to a completely different text protocol. That does not turn the other protocol into Telnet. When someone says “just telnet to port 80”, they mean using the client as a generic tool. The web server on the other side has never heard of Telnet.

What the protocol provides

Telnet was built to connect machines from different vendors that shared almost nothing. Not the same character set, not the same line endings, not the same keyboard.

To make that work, the protocol provides three things. A common terminal model, so two different systems agree on what a “terminal” is. Control commands, like interrupting a running process. And a way to negotiate optional behavior, so capable clients and servers can agree on extras without breaking simple ones.

Each of these gets its own lesson in this module. Together they are the actual protocol, as opposed to the raw TCP connection underneath.

Why learn it in 2026

Nobody should use Telnet to log into machines anymore. I will be blunt about why throughout this course: everything travels unencrypted, and SSH replaced it decades ago.

But as a learning tool, Telnet is hard to beat. The protocol is readable enough to study by hand. You can type it, read the responses, and watch its control bytes in a hex dump. Very few protocols let you do that with nothing but a terminal.

That makes it a great way to learn how application protocols sit inside a TCP connection. You will build a tiny server, connect to it, and read every byte that crosses the wire.

Learn it as anatomy, not as a tool for production access.

Lesson completed