From f2d6255b6ff494f177de2b5504ef716e2b4a28f2 Mon Sep 17 00:00:00 2001 From: admManuel Date: Tue, 6 May 2025 12:09:06 +0000 Subject: [PATCH] Update Linux/SSH/secure_ssh.sh --- Linux/SSH/secure_ssh.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Linux/SSH/secure_ssh.sh b/Linux/SSH/secure_ssh.sh index c23ae3e..0f85638 100644 --- a/Linux/SSH/secure_ssh.sh +++ b/Linux/SSH/secure_ssh.sh @@ -523,6 +523,16 @@ EOL log "Prüfe SSH-Konfiguration..." +# Stelle sicher, dass das Privilege‑Separation‑Verzeichnis existiert +if [ ! -d /run/sshd ]; then + warn "/run/sshd fehlt - erstelle Verzeichnis..." + sudo mkdir -p /run/sshd + sudo chown root:sys /run/sshd || sudo chown root:root /run/sshd + sudo chmod 0755 /run/sshd + log "/run/sshd wurde erstellt." +fi + + # Überprüfe, ob die Konfiguration gültig ist if command -v sshd &> /dev/null; then if ! sudo sshd -t &> /dev/null; then