Sign inSign up

croneu/bastion-ssh

By croneu

•Updated about 3 years ago

Bastion SSH Host Docker Image

Image
0

1.9K

croneu/bastion-ssh repository overview

⁠docker-bastion-ssh

Bastion SSH Host Docker Image.

⁠Abstract

This contains a SSH Docker Image which can be used to run a bastion SSH service e.g. in an ECS environment to reach internal resources via ssh using srv-records.

The image contains a ssh-srv wrapper script and other useful tools.

⁠Usage

To test the image locally:

export GITHUB_USERNAME=YOUR_GITHUB_USERNAME
docker run --rm -p 1122:22 -e IMPORT_GITHUB_PUB_KEYS=$GITHUB_USERNAME croneu/bastion-ssh

Then connect to the ssh service:

ssh ssh-user@localhost -p1122

⁠Settings

You can set PROMPT_INFO environment variable which is shown besides the prompt when logging in. Helpful if you have multiple bastions for multiple environments so that you know where you are logged in currently.

For compatibility with other environments, fallback to ENV in case this variable is set.

⁠Tools

Following tools are installed:

  • MySQL client
  • Redis CLI
  • MongoDB-Shell and Tools
  • AWS Cli
  • Unix tools: rsync, screen, vi, zip, unzip, ping, less, jq

⁠Access SRV based SSH servers

Use nc-srv wrapper to connect to SSH servers which are reachable through their SRV-records:

For example:

Host ptaheute-staging
    User application
    Hostname pta-staging.local
    ProxyCommand ssh -A ptaheute-bastion nc-srv %h

Host ptaheute-bastion
    Hostname net.aws.ptaheute.de
    User ssh-user

⁠ECS

t.b.c.

⁠Authors

  • Remus Lazar (rl at cron.eu)

Tag summary

Content type

Image

Digest

sha256:5419e52ba…

Size

214.2 MB

Last updated

about 3 years ago

docker pull croneu/bastion-ssh