Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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

share|improve this answer
    
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 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 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 at 22:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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