
To reproduce it just run:
docker run --rm -ti registry.centos.org/che-stacks/centos-stack-base
you should see the following output:
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Could not load host key: /etc/ssh/ssh_host_ed25519_key
sshd: no hostkeys available -- exiting.
[user@ea91ad6b3be0 projects]$
cc @dharmit
Add sudo /usr/bin/ssh-keygen -A to the entrypoint just before starting sshd
Can confirm that solution works ^, I tried it earlier but wanted to make sure I wasn't missing something
Most helpful comment
Add
sudo /usr/bin/ssh-keygen -Ato the entrypoint just before starting sshd