Public | Automated Build

Last pushed: 9 months ago
Short Description
Alpine based sshd with user management.
Full Description

SSHD

Minimal Alpine Linux Docker container with sshd exposed and rsync installed.

Mount your .ssh credentials (RSA public keys) at /root/.ssh/ in order to
access the container via root ssh or mount each user's key in
/etc/authorized_keys/<username> and set SSH_USERS config to create user accounts (see below).

Optionally mount a custom sshd config at /etc/ssh/.

Environment Options

  • SSH_USERS list of user accounts and uids/gids to create. eg SSH_USERS=www:48:48,admin:1000:1000
  • MOTD change the login message

Usage Example

docker run -d -p 2222:22 -v /secrets/id_rsa.pub:/root/.ssh/authorized_keys -v /mnt/data/:/data/ macropin/sshd

or

docker run -d -p 2222:22 -v $(pwd)/id_rsa.pub:/etc/authorized_keys/www -e SSH_USERS="www:48:48" macropin/sshd
Docker Pull Command
Owner
kumori
Source Repository