What is netcat
Ncat is popular tool for network diagnistic. Now it is a part on Nmap software. It is available for all "mainstream" operation systems.
Install nmap on Windows
To install nmap (and ncat as part of nmap) please do follow:
- Login to your server with administrative privileged user;
- Download the installer and run it. Accept the EULA;
- Tick the Ncat tool. You may also tick other utilities if you need it. Then choose install destination, click Install and wait a little;
- Run cmd terrminal and check ncat version;
ncat -v
Checking example
To check ncat is really working, open two terminal windows.
- On the first window run:
ncat -l <any_port>
- On the second window run:
ncat -C localhost <choosen_port>
You can "chat" between the windows:
Install nmap on Linux OS
Setup process on Linux (Ubuntu 20.o4 as example is very simple. Just complete this instruction:
- Authorize as privileged user and run installation command;
apt-get update; apt install -y netcat
Using example the same - open two terminal windows and run these commands:
nc -l # In one session, to check "server-mode"
nc -C # In another terminal, to check "client-mode"
Conclusion
In this article I explained how to install and use ncat tool on Windows 2022 Server and Ubuntu 20.04 LTS.