KB Article #181705

HOWTO: Testing port connectivity with "curl" when "telnet" is not available

Problem

In some environments, for security reasons telnet is disabled. Still, it is quite often the case that network connectivity needs to be confirmed when troubleshooting connectivity issues. This seems to be particularly true for Windows environments.


Resolution

A very simple solution is available as a workaround if telnet cannot be enabled. As curl supports the telnet protocol, the following curl command, allows to run the same connectivity test without directly using telnet:


curl -v telnet://target_ip_address:desired_port_number


Example:


C:\Users\test\>curl -v telnet://10.222.33.44:10022
* Rebuilt URL to: telnet://10.222.33.44:10022/
* Trying 10.222.33.44...
* TCP_NODELAY set
* Connected to 10.222.33.44 (10.222.33.44) port 10022 (#0)