Sign inSign up

inetsix/sshd

By inetsix

•Updated over 7 years ago

Minimal Alpine Linux running SSH server

Image
0

313

inetsix/sshd repository overview

⁠Minimal Alpine LInux with Openssh server

Build Status

⁠Overview

Use this Dockerfile / -image to start a sshd-server upon a lightweight Alpine container.

⁠Features
  • Always installs the latest OpenSSH-Version available for Alpine
  • Password of "root"-user can be changed when starting the container using --env
  • You can choose between ssh-keypair- and password auth
⁠Basic Usage
⁠Authentication by password
$ docker run --rm \
  --publish=1337:22 \
  --env ROOT_PASSWORD=MyRootPW123 \
  inetsix/sshd

After the container is up you are able to ssh in it as root with the in --env provided password for "root"-user.

$ ssh [email protected] -p 1337
⁠Authentication by ssh-keypair
$ docker run --rm \
  --publish=1337:22 \
  --env KEYPAIR_LOGIN=true \
  --volume /path/to/authorized_keys:/root/.ssh/authorized_keys \
  inetsix/sshd

After the container is up you are able to ssh in it as root with a private-key which matches the provided public-key in authorized_keys for "root"-user.

$ ssh [email protected] -p 1337 -i /path/to/private_key

Tag summary

Content type

Image

Digest

Size

4.1 MB

Last updated

over 7 years ago

docker pull inetsix/sshd