I've created a small, portable and lightweight Docker container acting as an SSH gateway to your remote hosts.
It may be useful especially if you have a lot of remote machines you manage and use more than one local machine to connect to them.
The Docker image is based on Alpine Linux 3.3 and weighs only 45 MB.
- Pull the image from Docker Registry:
docker pull bbania/ssh-gateway
- Create an SSH key to be used inside Docker container:
ssh-keygen -t rsa -b 4096 -C <your_comment>
Add the ssh key to your remote hosts'
ssh_configfile with list of your hosts. Example config on github repo.
menu_datato set menu entries for your hosts
- title - provides menu title
- subtitle - additional title for menu
- type (takes either
- MENU - creates a menu entity (requires
subtitleto be set as well as
- COMMAND - executes a shell command
Example menu_data in menulist.py.
Running the container
Pass menulist.py, ssh key and ssh_config to the container as volumes:
docker run --rm -it \ -v /path/to/ssh_config:/etc/ssh/ssh_config \ -v /path/to/ssh-key:/root/.ssh/id_rsa \ -v /path/to/menulist.py:/menulist.py bbania/ssh-gateway
And that's it!