check_ssh plugin causing too many log messageswritten in /var/log/messages

Aaron Segura Aaron.Segura at cabelas.com
Wed Jan 3 18:22:02 CET 2007


You can set SSH so that it can only execute a specific command on the
remote end.

In your authorized_keys file for the nagios user on the remote end,
prepend "command=<some innocuous command>".

For example:

command="/bin/ls /tmp/crap" <authorized key info>

This will tell sshd to execute only this specific command may when this
key is used to log in.

-----Original Message-----
From: nagios-users-bounces at lists.sourceforge.net
[mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of Hari
Sekhon
Sent: Wednesday, January 03, 2007 9:41 AM
To: Nagios Users mailinglist
Subject: Re: [Nagios-users] check_ssh plugin causing too many log
messageswritten in /var/log/messages

I have the same problem.

Unfortunately I do not want to put unsecured ssh keys on my nagios 
server  and give the nagios user unrestricted access to all my 
production servers...

Perhaps I can just silence the sshd from complaining? Or even better 
would be for the check_ssh plugin to work properly and do the 
negotiation and then exit gracefully without logging in.

-h

Hari Sekhon



Aaron Segura wrote:
> Instead of using 'check_ssh', you can use 'check_by_ssh' and just run
a
> simple command like '/bin/ls /tmp' to verify connectivity.  This way,
> the ssh handshake is completed and there's no need to log a 'Read from
> socket failed' message.
>
> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net
> [mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of
> coolguy2007 at comcast.net
> Sent: Tuesday, January 02, 2007 3:34 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] check_ssh plugin causing too many log
> messageswritten in /var/log/messages
>
> Hi,
>
> Is there a way to make Nagios stop writing the messages like the
> following in the /var/log/messages on remote host:
>
>
> Jan  8 10:01:00 serverabc sshd[12110]: [ID 800047 auth.crit] fatal:
Read
> from socket failed: Connection reset by peer
>
> This happens whenever nagios makes a check using check_ssh to a remote
> host. This entry is written in the logs of remote host to which Nagios
> is trying to check the availability of ssh daemon. It looks like that
> Nagios is trying to make ssh connection to check for this service but
it
> does not actually do it and then it disconnects the connection
abruptly
> (hence the entry like above is written)
>  
>
> I do not understand why does it happen on some of the machines while
for
> others there is no entry written in the logs. This is just causing too
> many messages written in the logs on remote Solaris machines and this
is
> getting too annoying. Please enlighten us on how to cope with this
> nuisance? Thanks in advance.
>
> --Shahid
>
>
------------------------------------------------------------------------
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to
share
> your
> opinions on IT & business topics through brief surveys - and earn cash
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE
> V
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null
>
>
------------------------------------------------------------------------
-
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to
share your
> opinions on IT & business topics through brief surveys - and earn cash
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE
V
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null
>
>   

------------------------------------------------------------------------
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE
V
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list