As the title suggests it is not possible to do stop/start with the sshd container. The container will not restart after a stop operation.
Run:
docker-compose stop
docker-compose start -d
Check containers using portainer or other tool. Notice the sshd container is stopped. Checking logs shows that the container attempted to regenerate the server ssh key file (/etc/ssh/ssh_host_rsa_key). Since the container was being restarted instead of recreated the server ssh key file already exists and causes a prompt for overwrite.
One way to fix would be to add a check for the existence of the key.
Hello,
As the title suggests it is not possible to do stop/start with the sshd container. The container will not restart after a stop operation.
Run:
docker-compose stop docker-compose start -d
Check containers using portainer or other tool. Notice the sshd container is stopped. Checking logs shows that the container attempted to regenerate the server ssh key file (/etc/ssh/ssh_host_rsa_key). Since the container was being restarted instead of recreated the server ssh key file already exists and causes a prompt for overwrite.
One way to fix would be to add a check for the existence of the key.
Cheers,
Michael