Skip to content

Instantly share code, notes, and snippets.

@ndelitski
Created October 10, 2015 22:57
Show Gist options
  • Save ndelitski/e40aaa3fe3c9c55cefb4 to your computer and use it in GitHub Desktop.
Save ndelitski/e40aaa3fe3c9c55cefb4 to your computer and use it in GitHub Desktop.
test port on the host Will output 0 if port 123 is open, and 1 if it's closed.
nc 127.0.0.1 123 < /dev/null; echo $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment