From nobody Mon Jan 29 14:34:00 2024 X-Original-To: freebsd-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 4TNrQr5zkGz58pj0 for ; Mon, 29 Jan 2024 14:34:12 +0000 (UTC) (envelope-from gray@nxg.name) Received: from mx1.mythic-beasts.com (mx1.mythic-beasts.com [IPv6:2a00:1098:0:86:1000:0:2:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4TNrQq62HSz4YT5 for ; Mon, 29 Jan 2024 14:34:11 +0000 (UTC) (envelope-from gray@nxg.name) Authentication-Results: mx1.freebsd.org; none Received: by mailhub-cam-d.mythic-beasts.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rUSi8-00GHW4-TL; Mon, 29 Jan 2024 14:34:09 +0000 From: Norman Gray To: Jonathan Adams Cc: freebsd-questions@freebsd.org Subject: Re: Enabling SSHD Date: Mon, 29 Jan 2024 14:34:00 +0000 X-Mailer: MailMate (1.14r5964) Message-ID: <3CBFBF9D-B141-4417-AF5B-1E85CE6ABBC9@nxg.name> In-Reply-To: References: <20240129125745.fuh6nnc4dooto2oz@yosemite.mars.lan> 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 Content-Transfer-Encoding: quoted-printable X-BlackCat-Spam-Score: 24 X-Spam-Status: No, score=2.4 X-Rspamd-Queue-Id: 4TNrQq62HSz4YT5 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:44684, ipnet:2a00:1098::/32, country:GB] Greetings. On 29 Jan 2024, at 13:14, Jonathan Adams wrote: > Please disable root logins via SSH. Even on your LAN, it's bad practic= e. I think this is going a step too far. I'd agree with you that password-b= ased root access is likely to be problematic (pace Paul Foster's comments= elsewhere in the thread), but key-based ssh authentication, plus either = group or cert-based AuthZ, seems adequately secure. ssh certs are quite nice -- [1] is a nice write-up. Short-validity ssh c= erts let you control who has access, and allow clear logging of who has c= onnected. Password-based root logins don't make clear who has logged in,= and to me that's an important argument against permitting that. I don't= see a difference, in security terms, between permitting sudo to a root s= hell, and permitting cert-based ssh access. (I'm talking only about internal connections, of course -- outward facing= sshd servers are a different issue). Best wishes, Norman [1] https://engineering.fb.com/2016/09/12/security/scalable-and-secure-ac= cess-with-ssh/ -- = Norman Gray : https://nxg.me.uk