When I'm launching the docker container for the first time, I'm not able to connect via SSH:
# ssh www-data@localhost -i ~/.ssh/my_private_key
Permission denied (publickey).
After a restart of the container the same command works very well.
Maybe we have to restart the sshd service after modifing the /etc/ssh/sshd_config file. But I don't know how to do it. From # /etc/init.d/sshd restart I'm getting sh: /etc/init.d/sshd: not found although the file is there.
When I'm launching the docker container for the first time, I'm not able to connect via SSH:
After a restart of the container the same command works very well.
Maybe we have to restart the sshd service after modifing the
/etc/ssh/sshd_configfile. But I don't know how to do it. From# /etc/init.d/sshd restartI'm gettingsh: /etc/init.d/sshd: not foundalthough the file is there.