Wget is a useful command to download/test HTTP, HTTPS, and FTP. If ncat is not installed, then you can get it done with yum install nc on CentOS/RHEL servers. To start listening on a port: nc -l $PORTNUMBER This can be handy when you don’t have actual services running but want to ensure connectivity exists. Ncat: 0 bytes sent, 0 bytes received in 0.02 seconds.Īs mentioned, you can also use nc to bind the connection to listen on a particular port. Let’s take an example of testing 443 port on. To do a simple test to check if the port is opened or not, you will execute the following. nc) is a powerful network utility with many features like bind and accept a connection, execute commands remotely, write and read data, etc.
However, if you need some other option then here are some telnet alternatives. In most of the scenarios, telnet should help. Note: if you get a command not found while executing telnet then you need to install telnet as I explained here. If there is no issue in connecting, then you should see the connected message. Let’s say you want to test if you can connect to port 8080 on 10.0.0.1 IP address then the command would be. One of the widely used commands to test essential connectivity between servers, server to another network device’s IP. They are tested on CentOS, and I don’t see any reason not to work on another Linux distro. Whatever it might be, the following utility/commands would help you.
It could be anything like application can’t connect to backend service, unable to fetch data from external URL, verify if the flow is opened, etc. One of the common tasks for sysadmin is to check the connectivity to troubleshoot networking issues.
#How to use telnet in linux how to#
Wondering how to check connectivity between two network endpoints?