Hi,

you can use http for file transfer as well and communicate server password through a secret in the project. It is indeed possible to run an SSH server inside OpenShift. Just a little tricky. I've a blog about it [1].

[1] http://rboci.blogspot.bg/2016/06/creating-docker-images-suitable-for.html

Isuru Haththotuwa wrote on 07/09/17 13:02:
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


_______________________________________________
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to