This article explains how to test connectivity from a linux server to a destination service/port without installing telnet. This is useful in troubleshooting issues where a vRO workflow fails due to failed connection with an endpoint in your environment.
This can be used to test connectivity from a vRA or vRO appliance to a destination service and does not require telnet to be installed on the source.
Step 1 - SSH as root to the vRA or vRO appliance
- ssh firstname.lastname@example.org
Step 2- Enter the curl command
- enter the curl command below, replacing the IP and port with your destination IP and port
Example 1: test connectivity to SSHD port 22
$ curl -v telnet://127.0.0.1:22 * About to connect() to 127.0.0.1 port 22 (#0) * Trying 127.0.0.1... connected * Connected to 127.0.0.1 (127.0.0.1) port 22 (#0) SSH-2.0-OpenSSH_5.3 ^C
Example 2: test connectivity to telnet port 23
$ curl -v telnet://127.0.0.1:23 * About to connect() to 127.0.0.1 port 23 (#0) * Trying 127.0.0.1... Connection refused * couldn't connect to host * Closing connection #0 curl: (7) couldn't connect to host
Interpreting the Result
If you get a "Connected" message, connectivity is established and the test is successful.
If the message is "Connection Refused" it means connectivity was attempted, and the remote machine refused. This usually means that the port is not listening on the remote host. Check the destination server and make sure the service you're connecting to is running and that you're using the correct port.
If the command hangs with no response, that usually means that the connection attempt is not reaching the destination machine. This usually means there's a firewall in between the source and destination, or there's some other network routing/connectivity issue. Engage your network and firewall teams to trace the connection and find the blockage.