Openssh-server: changing password env var or file

Hello

We’re using openssh-server to build some device emulators for testing a large application. (Basically: Our application connects to devices via ssh and interacts with them. I set sshd_config to ForceCommand, connecting to an interactive shell script that emulates responses.) One of the things we need to now do is to be able to simulate changing the emulated device’s password. My question:

If I update the USER_PASSWORD env var or the contents of the USER_PASSWORD_FILE on-the-fly, will the ssh server use that new password the next time the application logs into the server, or is the password only loaded when the server starts?

No. Password is set during init: docker-openssh-server/root/etc/s6-overlay/s6-rc.d/init-openssh-server-config/run at master · linuxserver/docker-openssh-server · GitHub

Okay that’s too bad. Thank you for the quick reply!

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.