From owner-freebsd-questions@FreeBSD.ORG Mon Jul 14 13:36:57 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D827106567E for ; Mon, 14 Jul 2008 13:36:57 +0000 (UTC) (envelope-from carlaza@rocketmail.com) Received: from n34.bullet.mail.ukl.yahoo.com (n34.bullet.mail.ukl.yahoo.com [87.248.110.167]) by mx1.freebsd.org (Postfix) with SMTP id DD0F28FC0C for ; Mon, 14 Jul 2008 13:36:56 +0000 (UTC) (envelope-from carlaza@rocketmail.com) Received: from [217.12.4.214] by n34.bullet.mail.ukl.yahoo.com with NNFMP; 14 Jul 2008 13:23:44 -0000 Received: from [87.248.110.119] by t1.bullet.ukl.yahoo.com with NNFMP; 14 Jul 2008 13:23:44 -0000 Received: from [127.0.0.1] by omp224.mail.ukl.yahoo.com with NNFMP; 14 Jul 2008 13:23:44 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 54999.95570.bm@omp224.mail.ukl.yahoo.com Received: (qmail 34476 invoked by uid 60001); 14 Jul 2008 13:23:44 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=rocketmail.com; h=Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=Z8+Z8+fbGa6W7AVQHJTNeXJREHqPpC2HR7nRm63zKRe1q/gZ5RWfcgF7F2bj9iF445RvLP70kn9xeCKh5Cilm+PPYrdA2g2w6wIQAa+5rmS9sCSHJlBP7g/gdyiswYBh2IOTlVN3d/RFqmTF8L9ujlYj3aR3Vmomf/pTRJ77MVA=; Received: from [217.33.104.98] by web28209.mail.ukl.yahoo.com via HTTP; Mon, 14 Jul 2008 13:23:43 GMT X-Mailer: YahooMailRC/975.49 YahooMailWebService/0.7.199 Date: Mon, 14 Jul 2008 13:23:43 +0000 (GMT) From: Car Laza To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <939463.15027.qm@web28209.mail.ukl.yahoo.com> Subject: Nagios - check_by_ssh problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2008 13:36:57 -0000 Hello,=0A=0ASummary: running check_by_ssh command, but it is still failing.= =0A=0A=0AI'm not subscribed to this list, so please include my address expl= icitly in your replies. :)=0A=0A=0AOS: FreeBSD 7.0-STABLE=0A=0Agrep nag /et= c/passwd =0Anagios:*:181:181:Nagios pseudo-user:/var/spool/nagios:/usr/sbin= /nologin=0A=0ACommand being run as root:=0A=0Asu -m nagios -c "/usr/local/l= ibexec/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"=0A=0A= =0Adefine command {=0A command_name check_by_ssh=0A command_l= ine $USER1$/check_by_ssh -H $HOSTADDRESS$ -t $ARG1$ -l $ARG2$ -C $ARG3$ -i = $ARG4$=0A }=0A=0Adefine service{=0A use = generic-service=0A name ATI check= =0A service_description ATI feed=0A check_command= check_by_ssh!60!nagios!/usr/nagios/bin/check-ati.sh!/var= /spool/nagios/boxlive.ssh-key=0A host_name boxlive=0A = normal_check_interval 5 ; Check the service every 5 minutes = under normal conditions=0A retry_check_interval 1 ; Re-chec= k the service every minute until its final/hard state is determine=0A = notification_options c,r=0A }=0A=0A=0A/var/spool/nagios is owne= d by nagios user, see:=0A=0A=0A[root@nagios /var/spool/nagios]# ls -la .ssh= =0Atotal 6=0Adrwx------ 2 nagios nagios 512 Jul 14 13:32 .=0Adrwxrwxr-x = 6 nagios nagios 512 Jul 14 14:01 ..=0A-rw-r--r-- 1 nagios nagios 617 = Jul 14 13:32 known_hosts=0A=0A=0Aboxlive.ssh-key was generated by me, and i= t works.=0A=0AWhen running this command, as above, it works perfectly, yet = when running from nagios, as a service check, I get: =0A=0ARemote command e= xecution failed: Host key verification failed.=0A=0ASo, on the remote host:= =0A=0A[boxlive@/usr/nagios/.ssh]# pwd=0A/usr/nagios/.ssh=0A[boxlive@/usr/na= gios/.ssh]# ls -la=0Atotal 10=0Adrwx------ 2 nagios other 512 Ma= y 28 11:21 .=0Adrwxr-xr-x 4 nagios other 512 May 28 13:30 ..=0A-= rw-r--r-- 1 nagios other 1194 Jul 11 09:35 authorized_keys=0A-rw-= ------ 1 nagios other 887 May 28 11:10 id_rsa=0A=0A=0AWhat am I = doing wrong ?=0A=0AHow do I get this to work correctly ?=0A=0ANagios was in= stalled from /usr/ports/net-mgmt/nagios-devel, which is nagios-3.0.3.=0A=0A= Thank you for your time,=0ALazar=0A=0A=0A ____________________________= ______________________________=0ANot happy with your email address?.=0AGet = the one you really want - millions of new email addresses available now at = Yahoo! http://uk.docs.yahoo.com/ymail/new.html