From nobody Sat Oct 21 20:41:45 2023 X-Original-To: stable@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 4SCYKb2Pvlz4xXMR for ; Sat, 21 Oct 2023 20:42:11 +0000 (UTC) (envelope-from ben@altesco.nl) Received: from altus-escon.com (corp.altus-escon.com [217.100.254.150]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "altus-test.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SCYKZ0v3Kz3PRG for ; Sat, 21 Oct 2023 20:42:09 +0000 (UTC) (envelope-from ben@altesco.nl) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of ben@altesco.nl designates 217.100.254.150 as permitted sender) smtp.mailfrom=ben@altesco.nl; dmarc=none Received: from smtpclient.apple (212-204-186-235.cable.dynamic.v4.ziggo.nl [212.204.186.235]) (authenticated bits=0) by altus-escon.com (8.17.2/8.17.1) with ESMTPSA id 39LKg3Mj063722 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 21 Oct 2023 22:42:08 +0200 (CEST) (envelope-from ben@altesco.nl) X-Authentication-Warning: mars.altus-escon.com: Host 212-204-186-235.cable.dynamic.v4.ziggo.nl [212.204.186.235] claimed to be smtpclient.apple From: Ben Stuyts Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: Local sshd_config modifications Date: Sat, 21 Oct 2023 22:41:45 +0200 References: <202310211727.39LHRAIv053742@nuc.oldach.net> To: stable@freebsd.org In-Reply-To: <202310211727.39LHRAIv053742@nuc.oldach.net> Message-Id: <137708B0-9B98-440B-BF1C-5C6FACA52E48@altesco.nl> X-Mailer: Apple Mail (2.3731.700.6) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (altus-escon.com [193.78.231.142]); Sat, 21 Oct 2023 22:42:08 +0200 (CEST) X-Virus-Scanned: clamav-milter 1.2.0 at mars.altus-escon.com X-Virus-Status: Clean X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.90 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; RCVD_IN_DNSWL_MED(-0.20)[217.100.254.150:from]; R_SPF_ALLOW(-0.20)[+mx]; ONCE_RECEIVED(0.10)[]; MIME_GOOD(-0.10)[text/plain]; FREEFALL_USER(0.00)[ben]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[stable@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[altesco.nl]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[stable@freebsd.org]; RCVD_COUNT_ONE(0.00)[1]; TO_DN_NONE(0.00)[]; HAS_XAW(0.00)[]; ARC_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:33915, ipnet:217.100.128.0/17, country:NL]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4SCYKZ0v3Kz3PRG > On 21 Oct 2023, at 19:27, Helge Oldach wrote: >=20 > Miroslav Lachman wrote on Fri, 20 Oct 2023 14:54:20 +0200 (CEST): >> On 20/10/2023 10:41, Ben Stuyts wrote: >>>> Include /etc/ssh/sshd_config.d/*.conf >>>> Include /usr/local/etc/ssh/sshd_config.d/*.conf >>>=20 >>> Noted, thanks. Personally I just use Include = /etc/ssh/sshd_config.local, but I thought my initial solution would be = more generic. >>>=20 >>>> But search the internet first, there are reported bugs and = headaches with Include and Match. >>>=20 >>> I personally have not seen any problems when using Match with this. = But it looks like this was fixed in 8.4, and FreeBSD (12.4) is running = 9.1. >>>=20 >>> Looking at it now, I see that I also had to disable the Subsection = sftp part, as I sometimes redefine it in the local file. And sshd barfs = on duplicate Subsections. >>=20 >> Yes, this can be another problem. Cannot speak of sshd because I = never=20 >> used Include with it but there are problems with e.g. sudoers.d or=20 >> syslog.d included files - sometimes there cannot be redefinitions or = the=20 >> order of directives matters. >=20 > Simple modifications can be added through rc.conf (or rc.conf.d/sshd): >=20 > sshd_flags=3D"${sshd_flags} -o UseBlackList=3Dyes -o = ClientAliveInterval=3D15" >=20 > Does this perhaps work for the Include directive as well? No, unfortunately not. I just tried. It give the following error: Include directive not supported as a command-line option Ben