Simple Debian/Ubuntu Docker images with passwordless SSH access and a regular user
Tags (and their corresponding official base images)
The images are built by Docker hub.
Each Debian release corresponds to a tag. To run an SSH daemon in a new Debian "wheezy"
docker run -d -p 2222:22 -e SSH_KEY="$(cat ~/.ssh/id_rsa.pub)" krlmlr/debian-ssh:wheezy
This requires a public key in
Two users exist in the container:
root (superuser) and
docker (a regular user
sudo). SSH access using your key will be allowed for both
To connect to this container as root:
ssh -p 2222 root@localhost
To connect to this container as regular user:
ssh -p 2222 docker@localhost
2222 to any local port number of your choice.
Each Debian release corresponds to a Git branch, the branches differ only by
FROM element in the
To create the image
krlmlr/debian-ssh e.g. for Debian "jessie":
git checkout jessie make build
make rebuild to pull the base image and rebuild without caching.
make test to create a container and fetch all environment variables
via SSH. This requires an
.ssh/id_rsa.pub file in your home, it will be
passed to the container via the environment variable
SSH_KEY and installed.
Makefile is configured to run the container with the limited
account, this user is allowed to run
sudo without requiring a password.
The SSH daemon will be always run with root access. The
can help troubleshooting any issues you might encounter.
Could you support authorized_keys files as well, next to id_rsa.pub?