I'm attempting to do a check_by_ssh check on an AS400 system.
Running the command from the command line (as nagios user) works:
[nagios@nagios ~]$ /usr/local/nagios/libexec/check_by_ssh -l NAGIOS -H XXX.XXX.XXX.XXX -C "/home/NAGIOS/check_as400_cpu.pl -w 50 -c 90"
CPU OK: CPU usage at 2.7%.
However, putting the command into Nagios does not work, returning "Remote command execution failed: Permission denied, please try again."
Nagios commands are running as nagios user. I've double-checked the permissions on the target system, and the ssh key in the authorized_keys file. Everything seems to be OK there.
Suggestions?
check_by_ssh failing
-
cunningrat
- Posts: 29
- Joined: Mon Nov 18, 2013 5:51 pm
Re: check_by_ssh failing
Nevermind. Found the problem.
See, if you fumble-finger the IP address in the Nagios host definition, the remote system you're actually hitting doesn't have your SSH keys, so the Nagios commands don't work. Who'd've thought it...
See, if you fumble-finger the IP address in the Nagios host definition, the remote system you're actually hitting doesn't have your SSH keys, so the Nagios commands don't work. Who'd've thought it...