From owner-freebsd-questions@freebsd.org Tue Jul 18 07:49:16 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF7B0C7EEBD for ; Tue, 18 Jul 2017 07:49:16 +0000 (UTC) (envelope-from ws@au.dyndns.ws) Received: from ipmail05.adl6.internode.on.net (ipmail05.adl6.internode.on.net [150.101.137.143]) by mx1.freebsd.org (Postfix) with ESMTP id 788BD63456 for ; Tue, 18 Jul 2017 07:49:15 +0000 (UTC) (envelope-from ws@au.dyndns.ws) Received: from ppp103-111.static.internode.on.net (HELO lillith-iv.ovirt.dyndns.ws) ([150.101.103.111]) by ipmail05.adl6.internode.on.net with ESMTP; 18 Jul 2017 17:14:06 +0930 X-Envelope-From: ws@au.dyndns.ws X-Envelope-To: freebsd-questions@freebsd.org Received: from predator-ii.buffyverse (predator-ii.buffyverse [172.17.17.136]) by lillith-iv.ovirt.dyndns.ws (8.14.9/8.14.9) with ESMTP id v6I7i0ne065708; Tue, 18 Jul 2017 17:14:01 +0930 (ACST) (envelope-from ws@au.dyndns.ws) Message-ID: <1500363839.1558.1.camel@au.dyndns.ws> Subject: Re: sshd logging From: Wayne Sierke To: Paul Schmehl , FreeBSD Questions Date: Tue, 18 Jul 2017 17:13:59 +0930 In-Reply-To: References: <20170717051638.GB2368@c720-r314251> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.24.2 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Greylist: inspected by milter-greylist-4.6.2 (lillith-iv.ovirt.dyndns.ws [172.17.17.142]); Tue, 18 Jul 2017 17:14:01 +0930 (ACST) for IP:'172.17.17.136' DOMAIN:'predator-ii.buffyverse' HELO:'predator-ii.buffyverse' FROM:'ws@au.dyndns.ws' RCPT:'' X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (lillith-iv.ovirt.dyndns.ws [172.17.17.142]); Tue, 18 Jul 2017 17:14:01 +0930 (ACST) X-Scanned-By: MIMEDefang 2.78 on 172.17.17.142 X-Scanned-By: SpamAssassin 3.004001(2015-04-28) X-Scanned-By: ClamAV X-Spam-Score: -0.999 () ALL_TRUSTED,URIBL_BLOCKED X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 07:49:17 -0000 On Mon, 2017-07-17 at 18:35 -0500, Paul Schmehl wrote: > --On July 17, 2017 at 6:38:00 AM -0400 Daniel Feenberg .org> > wrote: > > > > > > > On Mon, 17 Jul 2017, Matthias Apitz wrote: > > > > > El día domingo, julio 16, 2017 a las 10:34:42p. m. -0500, Paul > > > Schmehl > > > escribió: > > > > > > > Is there a way to get sshd to only log successful logins? > > > > > > What about using ipf(8)? > > > > denyhosts or fail2ban would be easier. You'd still get a few lines > > in the > > logs, but only a few. > > > > Thanks, Dan. I'll take a look. > > I've never understood why logging routinely records every failed > interaction. I suppose it's because summarizing it would take more > processing plus some sort of database. Seriously though, why should I > care > about failed logins? It's the successful ones that I need to know > about. I imagine that historically the intensity of unauthorised login attempts carried more significance (or was thought to) than it does now. sshd_config(5) - LogLevel I haven't seen a description of which events are logged at each level, but I have seen a comment that setting it to "ERROR" eliminates the logging of failed attempts. This page suggests an approach that may be of interest: https://blog.stalkr.net/2010/11/login-notifications-pamexec-scripting.html Wayne