Skip to content

Commit 9256880

Browse files
authored
Fix SSH root access in install.func (#858)
1 parent 5b38448 commit 9256880

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

misc/install.func

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,11 @@ motd_ssh() {
231231

232232
# Disable default MOTD scripts
233233
chmod -x /etc/update-motd.d/*
234+
235+
if [[ "${SSH_ROOT}" == "yes" ]]; then
236+
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
237+
systemctl restart sshd
238+
fi
234239
}
235240

236241
# This function customizes the container by modifying the getty service and enabling auto-login for the root user

0 commit comments

Comments
 (0)