c0fcd67312d0c6668d3e5cd0b6eb1414577eed69
mtm-ssh-menu
A small Bash utility to browse SSH targets from YAML configuration and connect to them with fzf.
Features
- Interactive selection with
fzf - Global defaults for SSH user, port, and jump hosts
- Per-host overrides in grouped YAML files
- Support for jump hosts via named aliases
- Simple, dependency-light Bash script
Requirements
bashsshfzfjqyq
Usage
./mtm-ssh-menu [--config-dir DIR]
Options:
--help: show help--config-dir DIR: use a custom configuration directory
By default, the script reads configuration from:
~/.config/mtm-ssh-menu/global.yaml~/.config/mtm-ssh-menu/hosts/*.yaml
Configuration format
global.yaml
ssh:
default_user: root
default_port: 22
default_options: ""
jump_hosts:
office: "user@192.168.10.11"
hosts/dev.yaml
group: dev
servers:
- name: api-1
aliases:
- api
- backend
host: 192.168.10.11
user: dev
port: 2222
Each host entry can define:
namealiaseshostuserportjump_host
Example workflow
- Create the config directory.
- Add
global.yamland one or more files underhosts/. - Run the script.
- Select a target in the menu and connect.
Sample configuration
A complete sample configuration is available in sample-config/.
Notes
- The script requires
yq,jq,ssh, andfzfto be installed. - Jump hosts are resolved by name from
global.yaml. - If a host does not define a user or port, global defaults are used.
Description
Languages
TypeScript
82.1%
Shell
17.9%