Using Netcat

The netcat program, or nc, is the “Swiss Army Knife” of networking tools. With this one tool, you can connect to remote systems, transfer files, and even scan ports to see what connections are available.

Determining Open Ports

You can use nc to determine if certain services are running by scanning the ports associated with those services. This is great for troubleshooting your own servers, but you don’t want to just go around scanning anyone’s machines. It sends them traffic, and some systems might think you’re trying to find security vulnerabilities to exploit. For those reasons, you should only scan ports on servers you control.

Still, if you’re attempting to see if you can connect to a server from another machine, or looking ...

Get Small, Sharp Software Tools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.