Checking an alternative SSH port
In this recipe, we'll learn how to deal with the common situation of a machine running an SSH daemon that is listening on an alternative port. So, a service definition that uses
check_ssh, as used in the Monitoring SSH for any host recipe, fails because the plugin defaults to using the standard SSH TCP port number of 22.
This kind of setup is common in situations where an SSH server should not be open to the general public and is often employed as a "security by obscurity" method to reduce automated attacks against the server. The SSH daemon is therefore configured to listen on a different port, usually with a much higher number; administrators who need to use it are told what the port number is.
We'll deal with ...