Update SSH service to change directory to /srv/stack before executing shell
This commit is contained in:
parent
0e7f2b0d33
commit
93a1cc2e36
2 changed files with 2 additions and 2 deletions
|
|
@ -88,5 +88,3 @@ echo "Both services are running. PIDs: ${CHILD_PIDS[*]}"
|
||||||
|
|
||||||
# Wait for all background processes
|
# Wait for all background processes
|
||||||
wait
|
wait
|
||||||
|
|
||||||
cd /srv/stack
|
|
||||||
|
|
|
||||||
|
|
@ -29,4 +29,6 @@ chsh -s $SET_SHELL
|
||||||
# Cloud image generates this file which prevents sshd from accepting passwords
|
# Cloud image generates this file which prevents sshd from accepting passwords
|
||||||
rm -f /etc/ssh/sshd_config.d/50-cloud-init.conf
|
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
|
exec /usr/sbin/sshd -E /var/log/sshd.log -D
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue