Hello,
Summary: running check_by_ssh command, but it is still failing.
I'm not subscribed to this list, so please include my address explicitly in
your replies. :)
OS: FreeBSD 7.0-STABLE
grep nag /etc/passwd
nagios:*:181:181:Nagios pseudo-user:/var/spool/nagios:/usr/sbin/nologin
Command being run as root:
su -m nagios -c "/usr/local/libexec/nagios/check_by_ssh -t 60 -l nagios -H
bifllive.stellatravel.co.uk -C /usr/nagios/bin/check-ati.sh -i
/var/spool/nagios/boxlive.ssh-key"
define command {
command_name check_by_ssh
command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -t $ARG1$ -l $ARG2$
-C $ARG3$ -i $ARG4$
}
define service{
use generic-service
name ATI check
service_description ATI feed
check_command
check_by_ssh!60!nagios!/usr/nagios/bin/check-ati.sh!/var/spool/nagios/boxlive.ssh-key
host_name boxlive
normal_check_interval 5 ; Check the service every 5 minutes
under normal conditions
retry_check_interval 1 ; Re-check the service every minute
until its final/hard state is determine
notification_options c,r
}
/var/spool/nagios is owned by nagios user, see:
[EMAIL PROTECTED] /var/spool/nagios]# ls -la .ssh
total 6
drwx------ 2 nagios nagios 512 Jul 14 13:32 .
drwxrwxr-x 6 nagios nagios 512 Jul 14 14:01 ..
-rw-r--r-- 1 nagios nagios 617 Jul 14 13:32 known_hosts
boxlive.ssh-key was generated by me, and it works.
When running this command, as above, it works perfectly, yet when running from
nagios, as a service check, I get:
Remote command execution failed: Host key verification failed.
So, on the remote host:
[boxlive@/usr/nagios/.ssh]# pwd
/usr/nagios/.ssh
[boxlive@/usr/nagios/.ssh]# ls -la
total 10
drwx------ 2 nagios other 512 May 28 11:21 .
drwxr-xr-x 4 nagios other 512 May 28 13:30 ..
-rw-r--r-- 1 nagios other 1194 Jul 11 09:35 authorized_keys
-rw------- 1 nagios other 887 May 28 11:10 id_rsa
What am I doing wrong ?
How do I get this to work correctly ?
Nagios was installed from /usr/ports/net-mgmt/nagios-devel, which is
nagios-3.0.3.
Thank you for your time,
Lazar
__________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at
Yahoo! http://uk.docs.yahoo.com/ymail/new.html
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"