Here am not sure wht you are trying to achieve what s your
Code: Select all
"/usr/opt/something/command"#######
First:
/usr/lib/nagios/plugins/check_by_ssh -H 10.xx.xx.xx -C /usr/opt/something/command
Here you are not passing any user info who to fire this command on remote node ...??
Correct it as:
/usr/lib/nagios/plugins/check_by_ssh -l nagios -H 10.xx.xx.xx -C /usr/opt/something/command
#######
Second:
You need to stablish a password less auth ssh login from you nagios server to Remote server .. Follow below first ...
Step 1> Login to remote host
# create user nagios with some password
Step-2> From NagiosServer: Login as user nagios
# ssh-keygen -t dsa <-- do not pass any pass phrase
# ssh-copy-id -i .ssh/id_dsa.pub nagios@your-remote-server-ip
TEST
# ssh nagios@your-remote-server-ip
#### Now test Below
/usr/lib/nagios/plugins/check_by_ssh -l nagios -H <your-remote-server-ip> -C "uname -a"
#######
Third
Now ensure that what command you are fireying on remote host : user nagios should have proper permission to fire same .
--Shirish Shukla
http://shirishlinux.blogspot.in