the script that i used is
#!/bin/bash
···
2013/10/23 Francisco Gomez Leo pacogomezleo@gmail.com
when i execute the command by terminal , i used root user , /usr/local/lib/nagios/plugins/check_by_ssh -H “ipremoteserver” -l “userremoteserver” -C /home/nagios/hardware.sh -E the “userremoteserver” has access with rsa certificates and no password is needed , if he dont the command wouldn´t works in the terminal of my monitoringserver.
Thanks for the answer
2013/10/23 Marcel Schulte schulte.marcel@gmail.com
Hi Francisco,
when you execute the command in terminal - as which user do you do
that? Nagios executes all plugins as the user it runs as…
Looks as if the script does not need a password for the ssh user so
this should work with rsa certificates or similar. The used user is
very important then as the public cert of the user is taken to
authenticate.
HTH,
Marcel
2013/10/23 Francisco Gomez Leo pacogomezleo@gmail.com:
Hi , i used check_by_ssh to execute another script in a remote server, this
works when i execute the command in the shell but it dosent works when I
tried to used it with check_mk, that script always return (Return code of
255 is out of bounds) “critical” , in the check_mk interface …
define command{ command_name check_nas_server command_line
/usr/local/lib/nagios/plugins/check_by_ssh -H “ipremoteserver” -l
“userremoteserver” -C /home/nagios/hardware.sh -E }
it should be return 0 or 1 , and a echo message …
Could you help me ? , the userremoteserver has nopassword access to the
remote server , and is correct.
thank regards
checkmk-en mailing list