I have an Alpine-based container that offers sshd for an account user. The container's /home/user/.ssh/authorized_keys invokes a specific command:
command="ash -lc /usr/local/bin/command.sh" ssh-rsa ...
command.sh should pick up environment variables from /home/user/.profile. /home/user/.bashrc would be better suited, but since Alpine uses ash I use -l to let it act as if it had been invoked as a login shell.
What I observe when connecting to my container with ssh user@... (and e.g. dump environment variables with set in command.sh) is that the environment variables are apparently not picked up as expected. What am I missing?