Sign inSign up

mediacomem/openssh-host-keys

By mediacomem

•Updated over 6 years ago

Generate SSH host keys in a Docker container and copy them to a mounted directory

Image
1

611

mediacomem/openssh-host-keys repository overview

⁠Docker OpenSSH Host Keys

Generates SSH host keys in a Docker container and copies them to a mounted directory.

⁠Usage

This command will generate and copy a set of SSH host keys to the /path/to/target directory:

docker run \
  --rm \
  -e SSH_HOST_KEYS_OWNER=root \
  -e SSH_HOST_KEYS_GROUP=root \
  -e SSH_HOST_KEYS_MODE=644 \
  -e SSH_HOST_KEYS_DIRECTORY_MODE=700 \
  -v /path/to/target:/target \
  mediacomem/openssh-host-keys

⁠Configuration

The generated SSH host keys can be customized through these environment variables. All variables are optional.

VariableDefault valueDescription
SSH_HOST_KEYS_OWNERrootUser or UID who will own the generated SSH host keys.
SSH_HOST_KEYS_GROUProotGroup or GID that will own the generated SSH host keys.
SSH_HOST_KEYS_MODE644File system permissions of the generated SSH host keys.
SSH_HOST_KEYS_DIRECTORY_MODE-Optional file system permissions that will be set on the target directory.

Tag summary

Content type

Image

Digest

Size

3.6 MB

Last updated

over 6 years ago

docker pull mediacomem/openssh-host-keys