ZAZ
ZAZ

Reputation: 593

Display Welcome message upon successful netcat connection

I have 2 terminals with title SERVER and CLIENT

I have setup a netcat listener on SERVER with below command

nc -lvp 12345

and from CLIENT i connect to it using

nc 127.0.0.1 12345


When ever a client connects to the server, i just want to be informed on server that a client has connected.

Upvotes: 0

Views: 2842

Answers (1)

Alvaro Gutierrez Perez
Alvaro Gutierrez Perez

Reputation: 3887

(echo "Welcome"; cat) | nc -lvp 12345

Upvotes: 3

Related Questions