From 93a1cc2e3679c0e62e2e3695e91802f494f42b21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0trauch?= Date: Mon, 19 Jan 2026 14:21:35 +0100 Subject: [PATCH] Update SSH service to change directory to /srv/stack before executing shell --- entrypoint.sh | 2 -- service.ssh.sh | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 550c280..4025eca 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -88,5 +88,3 @@ echo "Both services are running. PIDs: ${CHILD_PIDS[*]}" # Wait for all background processes wait - -cd /srv/stack diff --git a/service.ssh.sh b/service.ssh.sh index 9df76f8..b82b4ee 100644 --- a/service.ssh.sh +++ b/service.ssh.sh @@ -29,4 +29,6 @@ chsh -s $SET_SHELL # Cloud image generates this file which prevents sshd from accepting passwords rm -f /etc/ssh/sshd_config.d/50-cloud-init.conf +echo "ForceCommand cd /srv/stack; exec $SET_SHELL -l" > /etc/ssh/sshd_config.d/99-custom.conf + exec /usr/sbin/sshd -E /var/log/sshd.log -D