As the title suggests, I would like to remotely monitor SSH authentication (not just TCP service) on a remote host. Occasionally, this host likes to have the service running but refuse logins through PAM.

There is check_ssh, which only monitors the TCP service, and there is check_by_ssh, which executes a remote command via ssh for monitoring purposes. I could hijack the latter, but it requires pub key authentication. I need to monitor with a plain SSH login. I realize the security implications.

Is a custom Nagios plugin that executes SSH my best bet?

1 Answer 1


if I understand you correctly, you can always run check_by_ssh (via pub key) and then run true

  • That's a sensible direction, although I really need to use interactive (password) auth to test the thing I'm emulating. I think maybe something with sshpass and true might do it?
    – roktechie
    Feb 25, 2014 at 14:34
  • 2
    I never done it, but I guess you can also you expect but then again that'd be something completely custom script.
    – alexus
    Feb 25, 2014 at 15:15
  • It might be helpful (and easier) to just look for PAM failures in auth.log or /var/log/messages or equivalent
    – Keith
    Feb 26, 2014 at 22:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.