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

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.

2 Answers

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.

You can test the port availability with the telnet command.

Login to machine1 and type:

 telnet <machine2 IP Address> 3000

If the request connects successfully, then communication between those machines over that port is available. If the request times out, you might be dealing with a firewall issue.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like