I'd like to write a monitoring plugin that checks various hosts on my network to make sure that password or interactive SSH authentication is not enabled. That is, I need to write code that:
- Connects to an SSH port.
- Enumerates available authentication methods.
- Verifies that only key based authentication is possible.
Methods using either python or bourne sh code (using ssh
) is most interesting to me, but other languages, libraries or hints are appreciated too.