Skip to content

Instantly share code, notes, and snippets.

@donchan922
Created October 12, 2019 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donchan922/ce72041a541a9ea49904085e18dd698a to your computer and use it in GitHub Desktop.
Save donchan922/ce72041a541a9ea49904085e18dd698a to your computer and use it in GitHub Desktop.
# 使用方法
$ nmap -p [port] [hostname or IP]
# リモートサーバのポートが空いている場合
$ nmap -p 22 192.168.1.2
Starting Nmap 6.40 ( http://nmap.org ) at 2019-10-12 13:32 UTC
Nmap scan report for 192.168.1.2
Host is up (0.0019s latency).
PORT STATE SERVICE
22/tcp open ssh
Nmap done: 1 IP address (1 host up) scanned in 0.44 seconds
# リモートサーバのポートが閉じている場合
$ nmap -p 22 192.168.1.3
Starting Nmap 6.40 ( http://nmap.org ) at 2019-10-12 13:40 UTC
Nmap scan report for 192.168.1.3
Host is up (0.0018s latency).
PORT STATE SERVICE
22/tcp closed ssh
Nmap done: 1 IP address (1 host up) scanned in 0.40 seconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment