CURL : Alternative for telnet tool to check listening port state in Linux/Windows

By | December 14, 2019

Dear user, the port will play the key role in the communication between the two systems. Whether it’s Linux servers or Window server. To cross verify the same, generally we will use the TELNET tool right… For security reasons, by default telnet is not available. Instead of that we can use the CURL command line tool.

Prerequisites :

The below tools are required to check the same.

  • MobaXterm or Putty or any other default terminal tool for Linux servers.
  • Command prompt (CMD) for Window servers.
  • VNC or XManager to access Linux server, if required.

How to check telnet is available or not?

Once login into the server, just type telne then press tab button. If it is available, then it’ll appear with full name as telnet. You can also verify by typing telnet then press enter. If it’s not available, the below error message will appear.

‘telnet’ is not recognized as an internal or external command, operable program or batch file.

Alternative Option :

If it is not available, we can use below CURL command line method, to check the port listening status. Here we have two ways to check the same. For that just login to the destination server,
Method 1 : > curl -v http://<FQDN or Host name or IP>:<PORT>
OR
Method 2 : >curl -v telnet://<FQDN or Host name or IP>:<PORT>

By using above two methods, we can easily check the listening status of port from source server to destination server. Also please make sure that source server IP/host name is able to ping in the target server before performing above methods.
telnet

More network troubleshoot commands:

  • tracert -d <target IP>
  • traceroute <target IP>
  • ping <target IP>

Related Articles :
* Commands To manage the SAP ERP/S4 with Hana DB on Linux-suse/redhat servers

Thank you!

“I hope this Article is helpful to you. If you like this, hit me with Face book like button and share it. If you have any queries, let me know as a comment below”

Leave a Reply

Your email address will not be published. Required fields are marked *