How-to-Use-Telnet-to-Check-Services-keyboardbanger6

How to Use Telnet to Check Services

The common use of telnet is to connect to a remote device. Network engineers use the telnet protocol to connect to switches and routers, whether they are Cisco, HP, Huawei…

Another use of telnet is to check if a TCP service is up and running or not, on the remote device. The syntax is the following:

Telnet {IP address of remote host} {TCP port number}

Use Telnet to test the web service

In order to test if the remote device contains a web service or not, you run the following command:

Telnet {IP address of remote host} 80

And if the device also supports SSL, you can test if you can connect to it through HTTPS with this command:

Telnet {IP address of remote host} 443

Remember though, that these numbers are the default values of HTTP and HTTPS. If someone, for any reason, has changed them, you need to run the above mentioned commands with the respective port numbers.

Here is an example of using telnet on a Windows machine. I’d like to know whether my home CUCM server supports HTTP or HTTPS. So I run a telnet command:

How-to-Use-Telnet-to-Check-Services-keyboardbanger1

It says that it is impossible to establish connection. It seems that the default 80 port for HTTP is not open. What if I try HTTPS default 443 port?

How-to-Use-Telnet-to-Check-Services-keyboardbanger2

How-to-Use-Telnet-to-Check-Services-keyboardbanger3

I got a black window. In the network engineering field, this is a valid server response. In other words, the “secure HTTP” service is up. Therefore, I can connect to my CUCM server with HTTPS. So, I test that with my browser with “https” instead of “http” in the URL:

How-to-Use-Telnet-to-Check-Services-keyboardbanger4
And it works!

Leave a Comment