SSH bastion/jump host with interactive menu. Key-based auth and secure SSH forwarding.
2.8K
| Repository | Link |
|---|---|
| GitHub | https://github.com/tackleza/docker-ssh-bastion |
| Docker Hub | https://hub.docker.com/r/tackleza/bastion |
A Docker image for a secure SSH bastion/jump host. Two user accounts are provided:
menu — interactive menu to select and connect to remote serversbastion — restricted jump point for SSH connection forwarding only
menu user with an interactive menu for connecting to remote serversbastion user for secure SSH forwarding (no shell access)/bastion_data volumeMount a volume from your host to /bastion_data. Required structure:
/bastion_data/
├── authorized_keys # Public keys allowed for both users
├── menu_ssh_key # Private key for 'menu' user (auto-generated)
├── menu_ssh_key.pub # Public key for 'menu' user (auto-generated)
├── servers.conf # Servers 'menu' user can connect to
├── ssh_keys/ # SSH host keys (auto-generated)
servers.conf Format[ssh_user]@[alias] [ip_or_hostname]
Example:
tackle@d01 192.168.1.2
tackle@d02 192.168.1.3
tackle@d03 192.168.1.4
authorized_keysAdd public SSH keys (one per line):
ssh-rsa AAAAB3Nza... user@domain
docker pull tackleza/bastion:debian
docker run -d \
-v $(pwd)/bastion_data:/bastion_data \
-p 2222:22 \
tackleza/bastion:debian
SSH is exposed on port 2222. The bastion_data directory is created automatically on first run.
menu Userssh menu@<host-ip> -p 2222
You'll see a menu of available servers from servers.conf.
bastion User (Jump Point)ssh bastion@<host-ip> -p 2222
Use as a jump host for SSH forwarding:
# By IP
ssh -J bastion@<host-ip>:2222 remote_user@remote_ip
# By alias (from servers.conf)
ssh -J bastion@<host-ip>:2222 tackle@d01
| File | Description |
|---|---|
authorized_keys | Public keys allowed for both menu and bastion users |
servers.conf | Remote servers available to the menu user |
ssh_keys/ | SSH host keys — auto-generated if missing |
menu and bastion users share the same authorized_keys filemenu are stored in menu_ssh_key and menu_ssh_key.pubBuilt as a hobby project with security in mind. No warranty is provided. For production use, evaluate your security requirements carefully.
Content type
Image
Digest
sha256:a76cc9b3c…
Size
34.1 MB
Last updated
18 days ago
docker pull tackleza/bastion