Update Linux/SSH/secure_ssh.sh
This commit is contained in:
@@ -523,6 +523,16 @@ EOL
|
|||||||
|
|
||||||
log "Prüfe SSH-Konfiguration..."
|
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
|
# Überprüfe, ob die Konfiguration gültig ist
|
||||||
if command -v sshd &> /dev/null; then
|
if command -v sshd &> /dev/null; then
|
||||||
if ! sudo sshd -t &> /dev/null; then
|
if ! sudo sshd -t &> /dev/null; then
|
||||||
|
|||||||
Reference in New Issue
Block a user