extensive ssh /var/log/messages with remote auto login ssh

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
rnygren
Posts: 20
Joined: Wed May 30, 2012 4:29 pm

extensive ssh /var/log/messages with remote auto login ssh

Post by rnygren »

How do I stop the /var/log/messages from accumulating in the message file everytime i remote ssh from nagios to the target machines.
it puts in 4 messages every connection every 2 minutes 4 times a day. I looked into the /etc/log.d/conf/services/sshd.conf file and tried to goole but no answers.

sshd.conf from linux

###########################################################################
# $Id: sshd.conf,v 1.12 2002/10/12 02:08:09 kirk Exp $
###########################################################################

# You can put comments anywhere you want to. They are effective for the
# rest of the line.

# this is in the format of <name> = <value>. Whitespace at the beginning
# and end of the lines is removed. Whitespace before and after the = sign
# is removed. Everything is case *insensitive*.

# Yes = True = On = 1
# No = False = Off = 0

Title = "SSHD"

# Which logfile group...
LogFile = secure
LogFile = messages

# Only give lines pertaining to the sshd service...
*OnlyService = sshd
*RemoveHeaders

########################################################
# This was written and is maintained by:
# Kirk Bauer <kirk@kaybee.org>
#
# Please send all comments, suggestions, bug reports,
# etc, to kirk@kaybee.org.
########################################################

~
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: extensive ssh /var/log/messages with remote auto login s

Post by abrist »

Have you tried starting sshd with the -q (quiet) option?

Code: Select all

sshd -q
-q Quiet mode. Nothing is sent to the system log. Normally the beginning, authentication, and termination of each connec-
tion is logged.
!WARNING! This is NOT best practice and will disable all logging for sshd. You may want to only use keys and run a second instance of sshd on a different port with the "-q" switch. But as always, turning off logging for a public-facing service is bad news.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked