From nobody Tue Sep 19 16:47:51 2023 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RqnfF2fRZz4v7sr for ; Tue, 19 Sep 2023 16:48:05 +0000 (UTC) (envelope-from Lena@lena.kiev.ua) Received: from lena.kiev.ua (lena.kiev.ua [185.45.113.66]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RqnfC2LTXz4tf4 for ; Tue, 19 Sep 2023 16:48:03 +0000 (UTC) (envelope-from Lena@lena.kiev.ua) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=lena.kiev.ua header.s=3 header.b=YIghteru; spf=pass (mx1.freebsd.org: domain of Lena@lena.kiev.ua designates 185.45.113.66 as permitted sender) smtp.mailfrom=Lena@lena.kiev.ua; dmarc=pass (policy=none) header.from=lena.kiev.ua DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lena.kiev.ua; s=3; h=In-Reply-To:Content-Type:Mime-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=cwVspccs+CCKHD0KreiByMUjTC9GLsg2JT7OoXNcGvM=; b=YIghterusd5DSp9EvchRGJWjax tsEL35jidSQzmKlUc8Ci1+LVG3EzqK/pbEjHSyGL+UQxiSbZtR85ER0cD7HrBaqlv3JWZ0Yih07ad IZmcY1u2RCsTgYjZpI6FnXkj6Ma1jmn5U85zmZ4WrE3YBTHOkeIAaHxESrBIbC/NIXgI=; Received: from ip-1926.rusanovka-net.kiev.ua ([94.244.25.38] helo=bedside.lena.kiev.ua) by lena.kiev.ua with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96 (FreeBSD)) (envelope-from ) id 1qidtJ-0003Dm-0I; Tue, 19 Sep 2023 19:48:02 +0300 Received: from bedside.lena.kiev.ua (localhost.lena.kiev.ua [127.0.0.1]) by bedside.lena.kiev.ua (8.17.2/8.16.1) with ESMTP id 38JGlpCg009751; Tue, 19 Sep 2023 19:47:51 +0300 (EEST) (envelope-from Lena@lena.kiev.ua) Received: (from lena@localhost) by bedside.lena.kiev.ua (8.17.2/8.16.1/Submit) id 38JGlpX4009750; Tue, 19 Sep 2023 19:47:51 +0300 (EEST) (envelope-from Lena@lena.kiev.ua) Date: Tue, 19 Sep 2023 19:47:51 +0300 From: Lena@lena.kiev.ua To: "Dan Mahoney (Gushi)" Cc: questions@freebsd.org Subject: Re: Quieting SSHd messages to the console Message-ID: <20230919164751.GJ974@lena.kiev> References: List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Return-Receipt-To: Lena@lena.kiev.ua X-Spamd-Bar: ------ X-Spamd-Result: default: False [-6.20 / 15.00]; DWL_DNSWL_MED(-2.00)[lena.kiev.ua:dkim]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[lena.kiev.ua,none]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; MV_CASE(0.50)[]; RCVD_IN_DNSWL_MED(-0.20)[185.45.113.66:from]; R_DKIM_ALLOW(-0.20)[lena.kiev.ua:s=3]; R_SPF_ALLOW(-0.20)[+a]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[questions@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[lena.kiev.ua:+]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; FROM_NO_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:29141, ipnet:185.45.112.0/22, country:DE] X-Rspamd-Queue-Id: 4RqnfC2LTXz4tf4 > I want to get a message on the console when a user su's (auth.notice). > That seems pretty critical. > > I do not want to get logs on the console for every other ssh session that > fails to complete because the internet is full of bots. > > Sep 18 08:42:31 prime sshd[3098]: error: > Fssh_kex_exchange_identification: Connection closed by remote host > > Sep 18 08:38:24 prime sshd[2531]: error: PAM: Authentication > error for illegal user test from 78.38.71.249 > > What goes to the console in /etc/syslog.conf is: > > *.err;kern.warning;auth.notice;mail.crit /dev/console > > Is there a way to say "everything else.err, but not auth.err"? May be not exactly what you want, but I use LogLevel QUIET in /etc/ssh/sshd_config (sshd invoked from inetd).