Missing telnet, but need to test a TCP connection? Try echo!

This is such a simple trick, I'm still surprised. When you need to test a connection (TCP) but have no telnet or nc, you can use this workaround:

echo > /dev/tcp/google.com/80
echo $?
0

You won't get a response back, but that exitstatus ($?) will be either:

  1. 0 - It worked.
  2. not 0 - It did not work.
    1. If it takes really long for the command line to get back, not connection is possible.

      You can use this to send data to UDP, but since UDP is stateless, the exit status will always be "0".

Comments

Hello friends there is the

Hello friends there is the best place where you will get the subscribers youtube which will allow you to gain more traffic to your channel as you will earn more money through it and will get most of its advantage of it.

UC Browser is having all the

UC Browser is having all the features and functionality of Chrome, with web extensions and developer tools to install.UC browser is the best browser and it is also available for ios devices, blackberry, and android devices.

I can say this is the perfect

I can say this is the perfect blog for everybody who read and post here everyday. I dont know why I always visit here maybe its so nice to read here a interesting topics all day. So ill be back more to check more updates and new comments.

aussiewriter

I can say this is the perfect

I can say this is the perfect blog for everybody who aussiewriter read and post here everyday. I dont know why I always visit here maybe its so nice to read here a interesting topics all day. So ill be back more to check more updates and new comments.

If echo 0 means the TCP

If echo 0 means the TCP connection is working.Thanks for providing the info in a simple manner. NonJBStore is the latest app for ios to get paid apps for free. Install NonJBStore on your ios to download many apps and themes for free without jailbreaking your device.

nice

I think I'll need some more

I think I'll need some more information for making something like that.

It is a very appropriate

It is a very appropriate idea, and it works better on the application. - Marla Ahlgrimm

About Consultancy Articles Contact




References Red Hat Certified Architect By Robert de Bock Robert de Bock
Curriculum Vitae By Fred Clausen +31 6 14 39 58 72
By Nelson Manning [email protected]