A lightweight OpenSSH Docker image built on top of Alpine Linux.
The root password is "toor".
OpenSSH 7.9 & Alpine 3.9.4
$ docker run --rm --publish=1234:22 --name=sshd karunais13/alpine-sshd:latest
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
Server listening on 0.0.0.0 port 22.
Server listening on :: port 22.
$ ssh root@localhost -p 1234
# The root password is "toor".
$ docker ps | grep 1234
140e4b28edc5 karunais13/alpine-sshd:latest "/entrypoint.sh" 44 seconds ago Up 43 seconds 0.0.0.0:1234->22/tcp sshd
# to stop container
$ docker stop sshd
Change the root password to "lulaby123":
FROM karunais13/alpine-sshd:latest
RUN echo "root:lulaby123" | chpasswd
Disable the root password completely, and use your SSH key instead:
FROM karunais13/alpine-sshd:latest
COPY identity.pub /root/.ssh/authorized_keys
Content type
Image
Digest
Size
4.8 MB
Last updated
over 4 years ago
docker pull karunais13/alpine-sshd