What Telnet Is β the Original Remote Terminal Protocol
Telnet, which emerged in 1969, is a protocol that lets you connect to a networked computer's command line and operate it as if you were sitting right in front of it. Telnet is an extremely old protocol dating back to ARPANET, the internet's predecessor, and it works by sending a user's keystrokes over the network to a remote server and returning the resulting output. It's conceptually the ancestor of SSH, which is widely used for remote server management today.
Default Port 23 and How It Works
Telnet uses TCP port 23 by default, and once a client and server connect, all subsequent input and output flows through that single connection. Once a Telnet client establishes a TCP connection on the server's port 23, everything the user types is transmitted to the server in real time, and the server's response is sent right back to the client. The login process, command output β everything travels through this one text stream.
Why It Was Replaced by SSH β the Plain-Text Security Problem
Telnet transmits everything, including login passwords, in plain text with no encryption, so anyone on the network path can intercept it. Telnet was designed in an era when network eavesdropping wasn't a major concern, so it transmits everything β including usernames and passwords β without encryption. Once it became widely known that an attacker on the same network could steal login credentials with nothing more than a packet capture tool, SSH (Secure Shell), which encrypts the entire session, became the standard for remote access starting in the late 1990s.
Why It's Still Used β as a Port-Connectivity Testing Tool
It's retired as a secure login method, but it's still commonly used as a quick diagnostic tool to check whether a specific port is open. Actually logging in via Telnet has all but disappeared, but running "telnet server-address port-number" to quickly check whether a TCP connection to that port succeeds remains widely used. A successful connection means the port is open and not blocked by a firewall; a refused connection or no response signals that the port is closed or something along the path is blocking it.
How to Enable the telnet Command on Windows
Modern Windows ships with the Telnet client turned off by default, so you have to enable it manually through "Turn Windows features on or off" before the command will work. Open Control Panel's "Programs and Features," go to "Turn Windows features on or off," check "Telnet Client" in the list, and click OK to install it. Once installed, you can run the telnet command right away from Command Prompt or PowerShell. Mac and Linux usually include the telnet command by default, or it can be installed easily through a package manager.
A Real-World Example: Checking If a Port Is Open with Telnet
It's often used to quickly confirm that a specific service β like an email server's port 25 or a web server's port 80 β is properly open. For example, running "telnet mail.example.com 25" and seeing a successful connection along with the server's greeting banner confirms that mail server's SMTP port is open and working. If you instead see a "could not connect" message, it's worth checking whether a firewall is blocking it or the service itself is down. Keep in mind this is strictly for checking connectivity β never use Telnet for actual login or data transfer.