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

Re: Running sshd in a Docker Container on Openshift



This may be of interest to you:

https://docs.openshift.com/enterprise/3.1/admin_guide/manage_scc.html#enable-images-to-run-with-user-in-the-dockerfile

On Sun, Jul 9, 2017 at 6:03 AM Isuru Haththotuwa <isurulucky gmail com> wrote:
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
_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users
--
--
Jeff Cantrill
Senior Software Engineer, Red Hat Engineering
OpenShift Integration Services
Red Hat, Inc.
Office: 703-748-4420 | 866-546-8970 ext. 8162420
jcantril redhat com
http://www.redhat.com


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