Update Linux/SSH/secure_ssh.sh

This commit is contained in:
2025-05-06 12:09:06 +00:00
parent d2a3a9bccf
commit f2d6255b6f

View File

@@ -523,6 +523,16 @@ EOL
log "Prüfe SSH-Konfiguration..."
# Stelle sicher, dass das PrivilegeSeparationVerzeichnis 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