0

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?

rookie099
  • 155

1 Answers1

0

I switched the image's base image from alpine to debian, and there the issue went away because of the availability of /home/user/.profile.

rookie099
  • 155