How to test a TCP (or UDP) remote port without telnet or netcat (in a one-liner):
(google’s IP and TCP to 443)
timeout 1 bash -c '</dev/tcp/216.58.207.46/443 && echo Port is open || echo Port is closed' || echo Connection timeout
#shellmagic
-
-
Interesting. TIL. Thank you!
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.