[Nagiosplug-help] R: Remote command execution failed: Permissiondenied (publickey, keyboard-interactive).
J4
junk4 at klunky.co.uk
Thu Dec 17 17:10:29 CET 2009
Hi Marc,
The check commands are:
# 'check_remote_procs' command definition
define command{
command_name check_remote_procs
command_line $USER1$/check_by_ssh -p $ARG1$ -l nagios -i \
/usr/local/nagios/etc/keys/$HOSTNAME$ -H $HOSTADDRESS$ -C \
'/usr/local/nagios/libexec/check_procs -w $ARG2$ -c $ARG3$ -s $ARG4$'
}
# 'check_remote_swap' command definition
define command{
command_name check_remote_swap
command_line $USER1$/check_by_ssh -p $ARG1$ -l nagios -i \
/usr/local/nagios/etc/keys/$HOSTNAME$ -H $HOSTADDRESS$ -C \
'/usr/local/nagios/libexec/check_swap -w $ARG2$ -c $ARG3$'
}
Note that I have added the back slash \ to the lines above in this
Email. The key file is correctly named dd52, and I have tested this with:
root at abc:/usr/local/nagios/etc/objects# ssh -i
/usr/local/nagios/etc/keys/dd52 nagios at dd52
Last login: Thu Dec 17 12:01:59 2009 from 10.206.20.26
$
There are no ssh_config files in place.
Marc Mercer wrote:
> You are correct in your judgement.
>
> Can we see the check command for the two services? -- The identity file must be specified in the command, no cheating and using an ssh config file :(
>
>
> -----Original Message-----
> From: J4 [mailto:junk4 at klunky.co.uk]
> Sent: Thursday, December 17, 2009 6:58 AM
> To: nagiosplug-help at lists.sourceforge.net
> Subject: Re: [Nagiosplug-help] R: Remote command execution failed: Permissiondenied (publickey, keyboard-interactive).
>
> Hi Valeriom
>
> Nope. This is a message from the SSH key exchange stating that it
> cannot authenticate using the method. It should have used the key, but
> this failed so it fell back to the interactive keyboard, which would
> fail since its a process and not human, (unless one added expect into
> the code, but this is not the point ;)
>
> It has nothing to do with the libexec directories being executable or
> not. Incidentally, the files are all 755 on both the server and the client.
>
> Valerio.FABRIZIO at sungard.com wrote:
>> Seems like the plugin is not executable… (chmod 755), did you already
>> check this?
>>
>>
>>
>> Valerio Fabrizio* *
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> *Da:* J4 [mailto:junk4 at klunky.co.uk]
>> *Inviato:* giovedì 17 dicembre 2009 14.58
>> *A:* nagiosplug-help at lists.sourceforge.net
>> *Oggetto:* [Nagiosplug-help] Remote command execution failed:
>> Permissiondenied (publickey, keyboard-interactive).
>>
>>
>>
>> Dear Nagios oracles,
>>
>> I have added two services to a Nagios test server. I would like to
>> know roughly what misconfiguration I have.
>>
>> These two errors messages pop up:
>>
>> [1261054866] SERVICE NOTIFICATION: nagiosadmin;dd52;Swap
>> Usage;UNKNOWN;notify-service-by-sms;Remote command execution failed:
>> Permission denied (publickey,keyboard-interactive).
>>
>> [1261054866] SERVICE NOTIFICATION: nagiosadmin;dd52;Total
>> Processes;UNKNOWN;notify-service-by-sms;Remote command execution failed:
>> Permission denied (publickey,keyboard-interactive).
>>
>> On the Nagios server I can ssh into the target server without a password
>> (dd52) using the public key. The user on the Nagios server is nagios,
>> and the target server is nagios. Thus, SSH works well.
>>
>> These are the two services I have in the config file that rests in
>> /usr/local/nagios/etc/servers/dd52.cfg
>>
>> # dd52.cfg
>> define service{
>> use remote-service ; Name of
>> service template to use
>> host_name dd52
>> service_description Total Processes
>> check_command check_remote_procs!22!250!400!RSZDT
>> #check_command check_remote_procs!250!400!RSZDT
>> }
>>
>> define service{
>> use remote-service ; Name of
>> service template to use
>> host_name dd52
>> service_description Swap Usage
>> check_command check_remote_swap!22!20!10
>> }
>>
>>
>> The keys are readable by nagios:
>> root at abc:/usr/local/nagios/etc/keys# ls -l
>> total 8
>> -rw------- 1 nagios nagios 1675 2009-12-17 11:56 dd52
>> root at abc:/usr/local/nagios/etc/keys# ls -ld
>> drwxr-x--- 2 nagios nagios 4096 2009-12-17 11:56 .
>>
>> Of course, if these keys were unreadable then I should have seen an
>> error message like this, but I have not:
>> Remote command execution failed: Warning: Identity file
>> /usr/local/nagios/etc/keys/dd52 inaccessible: No such file or directory.
>>
>> Has anybody got an idea?
>>
>> Best wishes.
>>
>>
>> PS. uname -a : Linux abc 2.6.28-17-generic #58-Ubuntu SMP Tue Dec 1
>> 18:57:07 UTC 2009 i686 GNU/Linux
>>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
More information about the Help
mailing list