From owner-freebsd-questions@freebsd.org Wed Aug 5 16:59:59 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2ACC037B648 for ; Wed, 5 Aug 2020 16:59:59 +0000 (UTC) (envelope-from kremels@kreme.com) Received: from mail.covisp.net (mail.covisp.net [65.121.55.42]) (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 4BMHt63FwHz3ZQj for ; Wed, 5 Aug 2020 16:59:58 +0000 (UTC) (envelope-from kremels@kreme.com) From: "@lbutlr" Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: SSH log lines Date: Wed, 5 Aug 2020 10:59:56 -0600 References: <09256F5E-469C-402B-94DC-3C07F8AC29ED@kreme.com> <745dc612-d5a4-1e06-89bb-8df5dfbd7e1f@fechner.net> To: FreeBSD In-Reply-To: <745dc612-d5a4-1e06-89bb-8df5dfbd7e1f@fechner.net> Message-Id: X-Mailer: Apple Mail (2.3652.0.5.2.1) X-Rspamd-Queue-Id: 4BMHt63FwHz3ZQj X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of kremels@kreme.com designates 65.121.55.42 as permitted sender) smtp.mailfrom=kremels@kreme.com X-Spamd-Result: default: False [-1.02 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.90)[-0.905]; FROM_HAS_DN(0.00)[]; MISSING_MIME_VERSION(2.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+mx]; DMARC_NA(0.00)[kreme.com]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.02)[-1.016]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.70)[-0.700]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:209, ipnet:65.112.0.0/12, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[65.121.55.42:from] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Aug 2020 16:59:59 -0000 On 03 Aug 2020, at 23:22, Matthias Fechner wrote: > Am 03.08.2020 um 21:37 schrieb @lbutlr: >> When some moon tires to login to an account like root, ssh does n=E2=80= =99t log the IP address in the failure line as it does with non-existent = users. >>=20 >> sshd[99328] error: PAM: Authentication error for root from = vps-94314d13.vps.ovh.ca >> sshd[99328] Connection closed by authenticating user root = 139.99.236.165 port 46226 [preauth] >>=20 >> sshd[7202] Invalid user pi from 2.232.248.6 port 46438 >>=20 >> Is there anyway that I can change this so that the IP address appears = not eh same line as the Authentication error, it would make my = blacklisting these people much easier. >=20 > try fail2ban, it can handle all of this correctly. Why I am trying to do wis instantly ban any criminals attempting to = login to root (and a few other other accounts). Fail2ban will ban = repeated attempts (just like sshguard which I am already using). But it doesn't matter, the sshguard author is looking at adding a = feature for this. --=20 Space Directive 723: Terraformers are expressly forbidden from recreating Swindon.