Fix SSH root access in install.func (#858)

This commit is contained in:
Håvard Gjøby Thom
2024-12-16 23:43:32 +01:00
committed by GitHub
parent 5b38448107
commit 9256880c9f

View File

@@ -231,6 +231,11 @@ motd_ssh() {
# Disable default MOTD scripts
chmod -x /etc/update-motd.d/*
if [[ "${SSH_ROOT}" == "yes" ]]; then
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
}
# This function customizes the container by modifying the getty service and enabling auto-login for the root user