Linux – Send test message from one linux machine to another via command-line

command linelinux

I'm new to Linux. I have two machines. I can successfully PING one machine from the other. I'm now trying to send some data from one machine to the other. The machine I'm sending to expects the content to come in on port 3000. I'm concerned the machine I'm sending from is blocking this, but I'm not sure.

Is there a way for me to test this via the command line in linux? If so, how?

Thank you.

Best Answer

first, on the recieving host run:

sudo netstat -ntlup | grep 3000

to make sure you have a process running on that port.

then from the sending system, connect via telnet:

telnet <remoteIP> 3000

a text prompt should appear. if you are able to connect via telnet, then the port is accessible.

you can type the text of your command in there. what you type will depend on the kind of service running on port 3000 of the other box. if you enter the text correctly, telnet will display the remote systems response to your input.

Related Question