From 4a8fdf8c26c08082ec4843c94660efdcf4e4315b Mon Sep 17 00:00:00 2001 From: sec-check Date: Thu, 27 Aug 2026 13:27:00 -0400 Subject: [PATCH] =?UTF-8?q?[sec-check]=20fix:=20harden=20sshd=20drop-in=20?= =?UTF-8?q?=E2=80=94=20prohibit=20root=20password=20login,=20disable=20pas?= =?UTF-8?q?sword=20auth?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PermitRootLogin yes + PasswordAuthentication yes shipped in the image exposed brute-forceable remote root login. Switch to key-only auth (PermitRootLogin prohibit-password, PasswordAuthentication no, KbdInteractiveAuthentication no). Refs #28 Signed-off-by: sec-check --- elements/bluefin-server/os-sshd-config.bst | 4 ++-- files/os/ssh/sshd_config.d/bluefin-server.conf | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/elements/bluefin-server/os-sshd-config.bst b/elements/bluefin-server/os-sshd-config.bst index f8b4684d..8101383d 100644 --- a/elements/bluefin-server/os-sshd-config.bst +++ b/elements/bluefin-server/os-sshd-config.bst @@ -1,7 +1,7 @@ kind: import description: | - Install a temporary sshd drop-in that allows root login for bring-up - and cluster boot tests. + Install a hardened sshd drop-in: key-based auth only, no direct root + password login. Bring-up diagnostics use key-based access. sources: - kind: local diff --git a/files/os/ssh/sshd_config.d/bluefin-server.conf b/files/os/ssh/sshd_config.d/bluefin-server.conf index e48942e9..198bc05c 100644 --- a/files/os/ssh/sshd_config.d/bluefin-server.conf +++ b/files/os/ssh/sshd_config.d/bluefin-server.conf @@ -1,7 +1,9 @@ -# Temporary SSH configuration for Bluefin Server bring-up. -# This file is intentionally ephemeral and will be removed once boot-time -# diagnostics no longer require remote shell access. +# SSH configuration for Bluefin Server. +# Hardened defaults: no direct root password login, no password auth at all. +# Bring-up diagnostics must use key-based auth (inject an authorized_keys +# entry via systemd credentials or the installer). -PermitRootLogin yes +PermitRootLogin prohibit-password PubkeyAuthentication yes -PasswordAuthentication yes +PasswordAuthentication no +KbdInteractiveAuthentication no