Go to TogaWare.com Home Page. GNU/Linux Desktop Survival Guide
by Graham Williams
Duck Duck Go

Port Listening

To list hosts on the local network (e.g., 192.168.178.0/24) listening to particular ports (e.g., the secure shell port which is port number 22) we can use nmap. In the example here each host found in the specified IP address range reports the latency and the open port, checking just the port specified. Five hosts are identified each with an open port 22.

$ nmap --open -p T:22 192.168.178.0/24

Starting Nmap 7.60 ( https://nmap.org ) at 2019-11-21 21:09 AEDT
Nmap scan report for tenh (192.168.178.83)
Host is up (0.0015s latency).

PORT   STATE SERVICE
22/tcp open  ssh

Nmap scan report for nuho (192.168.178.84)
Host is up (0.079s latency).

PORT   STATE SERVICE
22/tcp open  ssh

Nmap scan report for yogh (192.168.178.90)
Host is up (0.00018s latency).

PORT   STATE SERVICE
22/tcp open  ssh

Nmap scan report for yoghe (192.168.178.91)
Host is up (0.000092s latency).

PORT   STATE SERVICE
22/tcp open  ssh

Nmap scan report for olia (192.168.178.92)
Host is up (0.073s latency).

PORT   STATE SERVICE
22/tcp open  ssh

Nmap done: 256 IP addresses (12 hosts up) scanned in 4.66 seconds


Support further development by purchasing the PDF version of the book.
Other online resources include the Data Science Desktop Survival Guide.
Books available on Amazon include Data Mining with Rattle and Essentials of Data Science.
Popular open source software includes rattle and wajig.
Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 1995-2020 Togaware Pty Ltd. . Creative Commons ShareAlike V4.