Salesforce

How to use Telnet (to Check the Status of Ports)

« Go Back
Information

When troubleshooting Internet connectivity problems, you should check early on if necessary application ports are open.
An easy way to do this, without having to install any additional software, is by using the well-known Telnet command.

What is Telnet?

Telnet is a network protocol, used on the Internet or Local Area Networks, that provides a bidirectional interactive text-oriented communications facility using a virtual terminal connection.[1]
We can use the Telnet command to connect to a port on a remote server to verify if the path from our computer to that server is open over that port.
Telnet was originally built to remotely control and manage mainframe computers from distant terminals.
It has largely been replaced by other technologies for secure remote control of computers, because Telnet sends data in plain text.

Characteristics of Telnet

Bidirectional: Telnet is a two-way protocol; commands sent can receive responses.

Interactive: Telnet expects a live user on one end of the connection.

Text-oriented: Telnet is a text-only protocol; you won’t see any graphics, nor can you transfer files over Telnet.

image.png

Establishing a Connection

Telnet commands have the following syntax:

Windows: 

C:\Users\administrator>telnet domainname.com 1024

Mac OS X:

Macintosh:~ administrator$ telnet domainname.com 1024

Linux:

root@linux:~# telnet domainname.com 1024

Checking the Status of a Port

Open a Command Prompt

  • Click on the Start Menu and in the search bar, type 'cmd', and press Enter.
  • OR press Windows Key + R to open the Run Prompt. Type 'cmd', then click OK (or press Enter)
Use the following Telnet syntax to check if a port is open:
telnet [domain name or ip address] [port]
  • Domain Name or IP Address should be the Domain Name or IP Address of the server to which you're trying to connect
  • Port is the Port Number on which the server should be listening for connections

For example

If you wanted to test if the server at 210.55.73.51 was listening on Port 3389 (RDP, Remote Desktop Protocol), you would open a command prompt, and enter the following command:

telnet 210.55.73.51 3389
 
User-added image
Figure 1: An example Telnet command
If the port is Open, you will see a blank screen. This means that the connection is successful.
 
User-added image
Figure 2: A blank window indicates the connection was successful

If the port is closed, you will receive a Connect failed message. 

User-added image
Figure 3: The Connect Failed message

Why did the Connection Fail?

This result could mean that

  • the server isn't accepting telnet connections (telnet may not be enabled)
  • the server is off
  • the specified port isn't open

Telnet returns an error when using Windows 7/8/10

In Windows 7/8/10 you may need to enable telnet first:

  • Go to Start > Control Panel > Programs
  • Under Programs and features, click Turn Windows features on or off
  • Check the box for Telnet Client
  • Click OK

References

Using Telnet to Test Open Ports (Industrial Networking)

Telnet. (2017, August 11). Retrieved August 18, 2017, from https://en.wikipedia.org/wiki/Telnet

 
System Information
How to use Telnet (to Check the Status of Ports)
9/04/2025, 1:01 pm
How-to-use-Telnet-to-Check-the-Status-of-Ports

Powered by