<P>
Hi,<BR>
I am trying to make ssh work without password so as i can use check_by_ssh further<BR>
<BR>
So for this what i have done is:<BR>
<BR>
1.)<BR>
ssh-keygen -t rsa1<BR>
ssh-keygen -t dsa<BR>
ssh-keygen -t rsa<BR>
<BR>
2.)<BR>
Copied the files generated into <BR>
~/.ssh on remote machine<BR>
<BR>
The content of ~/.ssh/identity.pub on the local machine goes in the file ~/.ssh/authorized_keys on the remote machines. <BR>
<BR>
The content of the ~/.ssh/id_dsa.pub on the local machine goes in ~/.ssh/authorized_keys on the remote machines. <BR>
<BR>
Likewise, the content of the ~/.ssh/id_rsa.pub on the local machine is appended to ~/.ssh/authorized_keys on the remote machines<BR>
<BR>
3.)<BR>
Priming the agent:<BR>
ssh_info_file=~/.ssh-agent-info-`hostname`<BR>
ssh-agent >$ssh_info_file<BR>
chmod 600 $ssh_info_file<BR>
source $ssh_info_file<BR>
ssh-add ~/.ssh/identity<BR>
ssh-add ~/.ssh/id_dsa<BR>
ssh-add ~/.ssh/id_rsa<BR>
<BR>
4.)<BR>
Attaching the agent:<BR>
<BR>
. ~/.ssh-agent-info-`hostname`<BR>
<BR>
After doing all this when i try to ssh from nagios server m/c to client m/c where i ahve copied the keys<BR>
still it asks for an password.<BR>
<BR>
What may be missing in this .<BR>
Plz suggest.<BR>
<BR>
Thanks.<BR>
Vivek.<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
On Mon, 07 Mar 2005 Anton Kornexl wrote :<BR>
>Tharanga wrote:<BR>
>>Hi,<BR>
>> Iam usig a plugin to check my syslogs.all remote hosts syslogs are redirect to my nagios server and on that sever iam running the check_log2.pl script. if i used that in command line its workign fine. but if i put that to nagios it gives no output error (iam cheking the "syslog" key word to just chek the result)<BR>
>>in my checkcomands.cfg i defined it as follws<BR>
>> define command {<BR>
>>command_name check_log2<BR>
>>command_line $USER1$/check_log2.pl -l /var/log/syslog -s /tmp/seek -p syslog<BR>
>>}<BR>
>> <BR>
><BR>
>I had the same problem (with embedded Perl interpreter)<BR>
>Enclose the check_log2.pl in a shell command file and use this command file as plugin<BR>
># 'check_warn_log' command definition<BR>
>define command{<BR>
> command_name check_warn_log<BR>
># command_line $USER1$/check_log2.pl -l /var/log/warn -s /tmp/warn.seek -p $ARG1$<BR>
> command_line $USER1$/debug_plugin.sh -l /var/log/warn -s /tmp/warn.seek -p $ARG1$<BR>
> }<BR>
><BR>
><BR>
>---- debug_plugin.sh ----<BR>
>#!/bin/bash<BR>
>/usr/lib/nagios/plugins/check_log2.pl $*<BR>
>exit $?<BR>
><BR>
>-- Anton Kornexl<BR>
><BR>
><BR>
><BR>
><BR>
</P>
<br><br>
<A target="_blank" HREF="http://clients.rediff.com/signature/track_sig.asp"><IMG SRC="http://ads.rediff.com/RealMedia/ads/adstream_nx.cgi/www.rediffmail.com/inbox.htm@Bottom" BORDER=0 VSPACE=0 HSPACE=0></a>