Skip to content
This repository has been archived by the owner on May 13, 2021. It is now read-only.
/ docker-sshd Public archive

A lightweight OpenSSH Docker image built atop Alpine Linux.

License

Notifications You must be signed in to change notification settings

asensei/docker-sshd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docker-sshd

A lightweight OpenSSH Docker image built atop Alpine Linux.

Basic Usage

$ docker run --rm --publish=1080:22 asensei/docker-sshd # /entrypoint.sh
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 username@localhost -p 1080
...

Arguments are passed to sshd. For example, to enable debug output:

$ docker run --rm --publish=1080:22 asensei/docker-sshd -o LogLevel=DEBUG
...

Use authorized keys

Mount the authorized_keys (read-only), then specify the destination path in AUTHORIZED_KEYS. When the container starts, it makes a writable copy of the authorized_keys and it ensures that permissions on the file itself are correct.

docker run \
  -e AUTHORIZED_KEYS='/root/my_keys'
  -v /Users/john/auth_keys:/root/my_keys:ro
  -p 1080:22
  asensei/docker-sshd

About

A lightweight OpenSSH Docker image built atop Alpine Linux.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages