[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Running sshd in a Docker Container on Openshift



Hi,

I'm trying to do $subject. Using the minimal docker sample found at [1]. While this works perfectly in bare docker, when I'm trying to run on Openshift it fails with the error [2]. When I tried to re-create the ssh keys at startup with ssh-keygen -A, gave me the error [3]. I read that Openshift uses a random user id (usually 1000000000) when starting a container, I created a user with the same id, gave permission to /etc/ssh/ssh* and ran. Still did not work.

Seems a permission issue. Any idea what is going wrong here?

[1]. https://docs.docker.com/engine/examples/running_ssh_service/#build-an-eg_sshd-image

[2].
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Could not load host key: /etc/ssh/ssh_host_ed25519_key

[3].
open /etc/ssh/ssh_host_key failed: Permission denied.
ssh-keygen: generating new host keys: RSA1 Saving the key failed: /etc/ssh/ssh_host_key.
ssh-keygen: generating new host keys: RSA Saving the key failed: /etc/ssh/ssh_host_rsa_key.
open /etc/ssh/ssh_host_rsa_key failed: Permission denied.
open /etc/ssh/ssh_host_dsa_key failed: Permission denied.
ssh-keygen: generating new host keys: DSA Saving the key failed: /etc/ssh/ssh_host_dsa_key.
open /etc/ssh/ssh_host_ecdsa_key failed: Permission denied.
ssh-keygen: generating new host keys: ECDSA Saving the key failed: /etc/ssh/ssh_host_ecdsa_key.
open /etc/ssh/ssh_host_ed25519_key failed: Permission denied.
ssh-keygen: generating new host keys: ED25519 Saving the key failed: /etc/ssh/ssh_host_ed25519_key.

--
Thanks and Regards,
Isuru

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]