Docker SSH configuration?


I'm trying to setup remote debugging as indicated in the following post and I'm almost there.

I have the Ruby app and SSHD running in the container, though the recipe I found for configuring SSHD isn't fully compatible with the Linux distro that the Ruby image is based on.

I based my SSHD configuration on this Docker documentation page:

My image is based on the ruby:2.2 image from Docker Hub, which uses Debian 8 as opposed to Ubuntu 16.04 used in the SSHD example above.

I can get to a SSH prompt but I can't login with the screencast password for root that's set in the dockerfile.

I'm open to whatever solution works, either properly enabling root login or adding a new user with the correct permissions to allow for remote debugging. I'm just curious which path would be most straight forward in the Debian context. And if it's creating a new user, what permissions do they need?

Also, to be clear I'm treating this as a trial run and will obviously make sure to strip out the SSHD functionality in some way when I go to deploy the app for any context outside of development.

Thanks in advance for your help.


Please sign in to leave a comment.