KB Article #178020

Testing the network connectivity without telnet

Problem

The "telnet" tool is very helpful for testing of the network connectivity and whether a specific port is accessible on the remote or local host. However, sometimes telnet is not available on the system.


Resolution

Using the path below, we could try to access the remote host and port as a local path in Bash shell:


/dev/tcp/host/port


If host is a valid hostname or Internet address, and port is an integer port number or service name, Bash attempts to open a TCP connection to the corresponding socket.


/dev/udp/host/port


If host is a valid hostname or Internet address, and port is an integer port number or service name, Bash attempts to open a UDP connection to the corresponding socket.


Example:


cat < /dev/tcp/10.232.24.100/10022


Output of the above command:


SSH-2.0-OpenSSH_5.3