Skip to content

💲 Minimal docker image with ssh-client and bash for CI usage

Notifications You must be signed in to change notification settings

protomodule/docker-ssh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


ssh


protomodule/ssh

Hardened & containerized OpenSSH client









protomodule/ssh is a container for running OpenSSH client.

License

Goals of protomodule/ssh

  • Provide a containerized SSH client
  • Harden default settings for OpenSSH
  • Additional features like automatic key scanning
  • Fun terminal output

Usage

Run this image with docker as you would run ssh:

docker run --rm -it protomodule/ssh root@localhost

Or supply a custom private key:

docker run -e SSH_PRIVATE_KEY="$(cat ~/.ssh/id_ed25519)" --rm -it protomodule/ssh root@localhost

Secure copy

To copy a file with SCP you also need to mount a volume into the container:

docker run -e SSH_PRIVATE_KEY="$(cat ~/.ssh/id_ed25519)" -v $(pwd):/local --rm protomodule/ssh scp /local/test.txt root@localhost:/tmp/test.txt

Configuration

Options for scanning may be provided as environment variables:

  • SSH_PRIVATE_KEY ... Provide a custom private key for authentication
  • KNOWN_HOST ... Automatically perform keyscan on this host
  • KNOWN_PORT ... Use non default port for this host
  • QUIET ... Minimize terminal output


SSH logo attribution Jessie Kirk, CC BY 4.0

About

💲 Minimal docker image with ssh-client and bash for CI usage

Resources

Stars

Watchers

Forks

Packages

No packages published