Telnet (teletype network) is a network protocol for text-based bidirectional communication through a CLI, which allows remote access. Telnet is vulnerable to cybersecurity attacks because it lacks encryption methods compared to the most modern SSH. However, it is still useful for tasks that do not involve the transmission of confidential information.
This article teaches you what Telnet is and how to use Telnet in Windows to test open ports.
- Windows operating system with administrator privileges
- Accessing the command prompt
- An address and port to test
What is Telnet
is a client-server protocol that predates the TCP protocol. The network protocol allows a user to log on to another computer within the same network through a TCP/IP connection.
A client computer running the Telnet client connects to a CLI on a remote device, most commonly a dedicated platform. Telnet is lightweight and fast, making it the preferred choice in some use cases:
- Initial configuration of network hardware
- Remote access to trusted internal networks
- Open or used port testing
- Troubleshooting web and mail servers.
- Port forwarding check.
How does Telnet work?
The Telnet protocol creates a communication path through a virtual terminal connection. Data is distributed in-band with Telnet control information via Transmission Control Protocol (TCP).
Unlike other TCP/IP protocols, Telnet provides a login screen and allows you to log in as an actual user of the remote device by establishing a connection on port 23. This type of access grants direct control with the same privileges as the credential owner.
Telnet comes with a command accessible from the command line in Windows. The telnet command also exists for macOS and Linux operating systems.
How to enable Telnet in Windows 10?
On Windows systems, Telnet is disabled by default. To check if Telnet is already enabled, open the command line and run telnet
If the command prompt does not recognize the command, there are two possible ways to enable the Telnet client in Windows
. Option 1: Enable Telnet using GUI
To enable the Telnet command using the GUI:
. Open the Programs and Features options in Control Panel:
2. Click the Turn Windows features on or off: 3 option
. Locate the Telnet Client option in the list, select it, and click OK to install the feature:
4. When Windows completes the requested change, click Close.
5. Open the command prompt and run telnet to open the Microsoft Telnet client:
6. Run quit to exit the Telnet client.
Option 2: Enable
Telnet using the command prompt
To enable the Telnet client from the command prompt:
1. At the command prompt, run
: pkgmgr /iu:”TelnetClient”
2. Restart the command prompt and run telnet to open the Microsoft Telnet client.
3. Run quit to exit the client
: How to use Telnet in Windows to test open ports The
Telnet syntax for testing open ports is: telnet
<port number > <>
The command accepts symbolic and numeric addresses. For example
: telnet towel.blinkenlights.nl 23
: telnet 127.0.0.1 80
After running the command, one of the following three options occurs:
1. The command throws an error, indicating that the port is not available for connection:
2. The command goes to a blank screen, indicating that the port is available.
3. When you run the command on an open port 23, the telnet host screen is displayed, confirming an
established Telnet connection:
The Telnet communication protocol provides a way to establish a direct connection to a remote host. Although not a safe option for most tasks, there are use cases where Telnet is a viable option.
For more information, see the most secure option and learn how to use SSH to connect to a remote server on Linux or Windows.