Test a port without telnet

Traditionally you’d use telnet to check a port. But bash now has that capability. Use:

cat < /dev/tcp/127.0.0.1/22

And here’s how to do it the nc way:

Single port:

nc -zv 127.0.0.1 80

Multiple ports:

nc -zv 127.0.0.1 22 80 8080

Range of ports:

nc -zv 127.0.0.1 20-30

https://superuser.com/questions/621870/test-if-a-port-on-a-remote-system-is-reachable-without-telnet

 

Leave a Reply

Your email address will not be published. Required fields are marked *