controlling tty

Mike McClure mmcclure at pneservices.com
Sat Dec 21 03:39:16 CET 2002



> Maybe I wasn't clear enough about this in asking my question, but when
> ssh'ing to each host *from the command line* and not *from the cgi
> frontend* the checks succeed.  It is when nagios is doing the regularly
> scheduled checks through the check_by_ssh plugin that the warning
> message is returned to the cgi frontend.  The checks would have failed
> when executing them manually from the command line if the hostkey of
> the remote machine wasn't already stored in ~/.ssh/known_hosts.

When you execute the checks from a shell, are you doing it as the nagios user, or as
another user?   When the nagios daemon executes them, it does so as the nagios user
(usually "nagios").

Try "su - nagios", then ssh'ing to the host.  I haven't ever tried ssh.com's version
of ssh, but with OpenSSH, if it doesn't have the host's key in known_hosts, it asks
you if you want to add it, then it doesn't ever ask again (unless it is changed).

>
> The only reference to this that I was able to find on the web was in
> the netsaint list archives on geocrawler.  Someone asked the same
> question that I did.  Unfortunately, the only answer posted to the list
> was someone who noted that there was a bug in redhat's /bin/login (from
> an earlier version of redhat than than the one I'm using).  They had
> suggested update the linux-util rpm.  Anyway, I don't think that's the
> issue here, and reading this e-mail list, it is obvious that others are
> successfully using the check_by_ssh plugin.
>
> thanks for the help so far,
> Nate
>
> On Friday, Dec 20, 2002, at 20:20 America/Indianapolis, Mike McClure
> wrote:
>
>> I think the problem is that you don't have a host key for each of the
>> remote hosts
>> on your monitoring host, available to the user under which you run the
>> plugin.
>>
>> You'll need to get them, either manually by editing the "known_hosts"
>> file, or by
>> ssh'ing as the nagios user to each host and accepting the host key.
>>
>> Take a look at
>> http://www.snailbook.com/faq/trusted-host-howto.auto.html for more
>> details.
>>
>>> Please see below for answers to each of your questions.  Thanks so
>>> much
>>> for your time so far.
>>>
>>> ~nate
>>>
>>> On Fri, 20 Dec 2002 16:43:10 -0600 (CST) "Mike McClure"
>>> <mmcclure at pneservices.com>
>>> wrote:
>>>
>>>> What operating systems are you using?
>>>
>>> Redhat 7.3 on the nagios monitorring host
>>> several other OS's on hosts being monitorred (but the situation is
>>> the same on all)
>>>
>>>> What version of the plugins are you using?
>>>
>>> 1.3-beta1
>>>
>>>> Are you using the commercial version of SSH, or OpenSSH?
>>>
>>> ssh.com's ssh (although it is the non-commercial version).  For the
>>> purposes of your question, I am using the commercial ssh.
>>>
>>>> SSHv2 or SSHv1?
>>>
>>> sshv2
>>>
>>>> How are you performing authentication?  .shosts?  RSA/DSA keys?
>>>
>>> I am using a keypair with a null passphrase.
>>>
>>>>> When doing remote checks through check_by_ssh, they work from the
>>>>> command
>>>>> line, but from the cgi interface, they return a warning status with
>>>>> the
>>>>> message:
>>>>>
>>>>>   warning: You have no controlling tty. Cannot read confirmation.
>>>>>
>>>>> Anyone know what I might be doing wrong?  Any advice would be great.
>>>>>
>>>>> Thanks,
>>>>> Nate
>>>>>
>>>>>
>>>>> -------------------------------------------------------
>>>>> This SF.NET email is sponsored by:  The Best Geek Holiday Gifts!
>>>>> Time is running out!  Thinkgeek.com has the coolest gifts for
>>>>> your favorite geek.   Let your fingers do the typing.   Visit Now.
>>>>> T H I N K G E E K . C O M        http://www.thinkgeek.com/sf/
>>>>> _______________________________________________
>>>>> Nagios-users mailing list
>>>>> Nagios-users at lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/nagios-users
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Mike McClure, CCIE # 5125, CISSP # 30232
>>>> PNE Services, Inc. -  http://www.pneservices.com
>>>> mmcclure at pneservices.com
>>>> mobile: 913-636-5590
>>>>
>>>>
>>>>
>>>> -------------------------------------------------------
>>>> This SF.NET email is sponsored by:  The Best Geek Holiday Gifts!
>>>> Time is running out!  Thinkgeek.com has the coolest gifts for
>>>> your favorite geek.   Let your fingers do the typing.   Visit Now.
>>>> T H I N K G E E K . C O M        http://www.thinkgeek.com/sf/
>>>> _______________________________________________
>>>> Nagios-users mailing list
>>>> Nagios-users at lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/nagios-users
>>>>
>>>>
>>>
>>>
>>> -------------------------------------------------------
>>> This SF.NET email is sponsored by:  The Best Geek Holiday Gifts!
>>> Time is running out!  Thinkgeek.com has the coolest gifts for
>>> your favorite geek.   Let your fingers do the typing.   Visit Now.
>>> T H I N K G E E K . C O M        http://www.thinkgeek.com/sf/
>>> _______________________________________________
>>> Nagios-users mailing list
>>> Nagios-users at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/nagios-users
>>>
>>>
>>
>>
>> --
>> Mike McClure, CCIE # 5125, CISSP # 30232
>> PNE Services, Inc. -  http://www.pneservices.com
>> mmcclure at pneservices.com
>> mobile: 913-636-5590
>>
>>
>>
>> -------------------------------------------------------
>> This SF.NET email is sponsored by:  The Best Geek Holiday Gifts!
>> Time is running out!  Thinkgeek.com has the coolest gifts for
>> your favorite geek.   Let your fingers do the typing.   Visit Now.
>> T H I N K G E E K . C O M        http://www.thinkgeek.com/sf/
>> _______________________________________________
>> Nagios-users mailing list
>> Nagios-users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/nagios-users
>>
>>
>
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:  The Best Geek Holiday Gifts!
> Time is running out!  Thinkgeek.com has the coolest gifts for
> your favorite geek.   Let your fingers do the typing.   Visit Now.
> T H I N K G E E K . C O M        http://www.thinkgeek.com/sf/
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
>
>


-- 
Mike McClure, CCIE # 5125, CISSP # 30232
PNE Services, Inc. -  http://www.pneservices.com
mmcclure at pneservices.com
mobile: 913-636-5590



-------------------------------------------------------
This SF.NET email is sponsored by:  The Best Geek Holiday Gifts!
Time is running out!  Thinkgeek.com has the coolest gifts for
your favorite geek.   Let your fingers do the typing.   Visit Now.
T H I N K G E E K . C O M        http://www.thinkgeek.com/sf/




More information about the Users mailing list