Skip to content

Instantly share code, notes, and snippets.

@uilian
Last active July 1, 2021 13:01
Show Gist options
  • Save uilian/2861b266d5063eb6d8259043002e40b9 to your computer and use it in GitHub Desktop.
Save uilian/2861b266d5063eb6d8259043002e40b9 to your computer and use it in GitHub Desktop.

Test if a port on a remote system is reachable (without telnet)

From the man pages:

  • 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment