8 Practical Linux Netcat NC Command Examples
Netcat or nc is a networking utility for debugging and investigating the network. This utility can be used for creating TCP/UDP connections and investigating them. The biggest use of this utility is in the scripts where we need to deal with TCP/UDP sockets. In this article we will learn about the netcat command by some practical examples. 1. Netcat in a Server-Client Architecture The netcat utility can be run in the server mode on a specified port listening for incoming connections. $ nc -l 2389 Also, it can be used in client mode trying to connect on the port(2389) just opened $ nc localhost 2389 Now, if we write some text at the client side, it reaches the server side. Here is the proof : $ nc localhost 2389 HI, server On the terminal where server is running : $ nc -l 2389 HI, server So we see that netcat utility can be used in the client server socket communication. 2. Use Netcat to Transfer Files The netcat utility can also be used to transfer files. At the client side,Read full article from 8 Practical Linux Netcat NC Command Examples
No comments:
Post a Comment