What Is Telnet? Differences from SSH and How It's Used for Port Testing

It's barely used for logins anymore, but as a way to check whether a port is open, it's still very much in service.

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.

Curious how SSH actually works?

SSH replaced Telnet by encrypting the entire session using public-key cryptography, so even if someone intercepts the traffic, they can't read the login credentials or anything else exchanged. It also supports key-based authentication instead of just passwords, which is why it became the standard for securely managing remote servers.

Want to know more about ports in general?

Beyond port 23, thousands of other port numbers are assigned to specific services by convention β€” port 80 for web traffic, 25 for outgoing mail, and so on. Getting familiar with a handful of the most common ones makes network troubleshooting, including the kind of port testing described here, much easier to reason about.

Frequently Asked Questions

Is it okay to still use Telnet to log in and manage a server?

It's not recommended. Because Telnet transmits everything, including login credentials, as unencrypted plain text, anyone intercepting packets on the same network can see your account information in the clear. Remote server management should always use SSH instead.

I ran a Telnet port test and the connection immediately dropped.

If the connection drops right after connecting, the port is very likely open, but the service behind it doesn't understand the Telnet protocol itself, the way a web server or mail server would expect different input. Even so, the fact that the connection succeeded at all confirms the port is open.