Sign inSign up

blacksalt/docker_ssh

By blacksalt

Updated about 8 years ago

Dockerized ssh server with any user id

Image
0

938

blacksalt/docker_ssh repository overview

Dockerized ssh server

With this image you can use the port forward features of ssh. It supports PubKey auth only.

Features

  1. It can run with any user id, so you can use it in OpenShift too
  2. You can specify RSA keys of the server (env or mount), so it won't overhelm your known_hosts
  3. Post process sshd_config with a sed script
  4. If RSA keys not specified they'll be regenerated at startup, not at build time

How to use

Variables

Variables are used only if the related files are not mounted.

VariableDefaultDescription
RSA_PUBKEYGenerate new key if empty and not mountedRSA pubkey of ssh server
RSA_PRIVKEYGenerate new key if empty and not mountedRSA private key of ssh server
AUTHORIZED_KEYSEmptyAllowed pubkeys. Separate multiple pubkeys with newline
SSH_USERNAME'user'User name of client
POSTPROCESS_CONFIG_SCRIPTEmptyYou can specify a sed script to postprocess sshd_config
Mounts
FileModeDescription
/home/user/server/sshd_config644You can specify the entire sshd config. It won't be modified by this image except by POSTPROCESS_CONFIG_SCRIPT
/home/user/server/ssh_host_rsa_key600Private RSA key of the server. The default config expects 2048 bit
/home/user/server/ssh_host_rsa_key.pub644Public RSA key of the server
/home/user/.ssh/authorized_keys600Allowed public keys

Tag summary

Content type

Image

Digest

Size

87.6 MB

Last updated

about 8 years ago

docker pull blacksalt/docker_ssh