I'd like to scan our network (IPv4 and IPv6) for ssh and find the offered authentication options.
Ultimately I'd like to end up with a parseable list[1] of hosts that contains the following info:
- IP
[IPv4|IPv6]
-address - Optional: FQDN at time of scan
- Port
- Offers Public Key Authentication
[YES|NO]
- Offers other options
[YES|NO]
- Is SSHv1
[YES|NO]
- SSH Version (the banner)
I don't actually care for the input format I could generate that, an optimal solution would accept the following:
- CIDR
- DNS records
- IPv4/IPv6 Addresses
in a file separeted by newlines. I have looked at nmap and it's nse engine, the stock nmap offers a scan for sshv1 but not for authentication options. Since my lua skills are ... en par with David Carradines Karate skills and Chuck Norris actor skills I can't write that stuff myself.
Also I'm not set on nmap since it's rather slow (at least to me) and I'd like to run this scan regularly to report results.
Question is: Which tools offer the required stuff?
[1]: I don't care wether it's XML, JSON, $FANCY_REPRESENTATION. It just needs to be machine parseable
As asked in the comment:
I have access to the hosts. I can log in and even sudo :) -- This is a compliance check. I can get the server configuration and we are running puppet that should ensure that the config is correct. We still rather want to rely on a client that verifies from the outside it is not working, also the advantage is that I can (with automated scans) run to the person who is responsible for the host and ask why the configuration management isn't running as that is already in place. I'm talking in the order of a couple of thousand hosts here and were are 12 people in the ops team, reading thru all the configs is ... not quite what we want (and not what the auditors want).