Find device open network ports without NMAP

Using the standard Python install (no extra packages) you can find SSH or other types of servers by Python script.

It uses Python sockets to:

  1. check if a port is open for each address in a subnet
  2. connects to that port, printing server messages
  3. optionally looks for a particular string to verify the server is enabled.

Alternative: find servers with unknown IP address but known ports open is by using Nmap.