Skip to content

A simple SSH connection menu in a Docker container.

Notifications You must be signed in to change notification settings

ssiuhk/ssh-gateway

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSH Gateway

A simple Python SSH menu in a Docker container.

alt Gateway Menu

Configuration

  • Pull the image from Docker Registry:
docker pull bbania/ssh-gateway
  • Create an SSH key with
ssh-keygen -t rsa -b 4096 -C <your_comment>
  • Create ssh_config file with list of your hosts.
    • File format:
Host node1
  IdentityFile ~/.ssh/id_rsa
  HostName my.host.ip
  User user
  Port 22
  • Edit menulist.py menu_data to set menu entries for your hosts
    • Format:
      • title - provides menu title
      • subtitle - additional title for menu
      • type (takes either MENU or COMMAND values):
        • MENU - creates a menu entity (requires subtitle to be set as well as options for submenu)
        • COMMAND - executes a shell command

alt Gateway Submenu

Example menu_data in menulist.py.

  • Add the ssh key to remote hosts.

Running 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

About

A simple SSH connection menu in a Docker container.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%