| name | ssh-config-manager |
| description | Manage SSH host configurations in ~/.ssh/config from the terminal. Use when adding, editing, or searching SSH hosts, cloning host configs, testing connections, or importing configs. Triggers include "ssh config", "ssh host", "sshm", "add ssh host", "edit ssh config", "test ssh connection". |
ssh-config-manager
CLI tool for managing ~/.ssh/config with CRUD operations, search, and connection testing.
Quick Start
sshm list
sshm show web
sshm add web --host example.com --user deploy
sshm search deploy
sshm test web
Add Hosts
sshm add web --host example.com --user deploy
sshm add web --host example.com --user deploy --port 22
sshm add bastion --host bastion.corp.com --user ec2-user --identity ~/.ssh/corp_key
List and Show
sshm list
sshm list --filter deploy
sshm show web
sshm show web --raw
sshm show "*"
Edit Hosts
sshm edit web --user deploy
sshm edit web --host new.example.com
sshm edit web --port 2222
sshm edit web --identity ~/.ssh/new
sshm edit web --set ForwardAgent yes
sshm edit web --unset ForwardAgent
sshm edit "*" --set ServerAliveInterval 120
Delete Hosts
sshm delete web
sshm delete web --yes
Search
sshm search deploy
sshm search 10.0.0
sshm search bastion
Test Connections
sshm test web
sshm test --all
Clone and Import
sshm copy web web-staging
sshm import ~/work-ssh-config
Backup and Restore
sshm backup
sshm restore
sshm config
CLI Reference
| Command | Description |
|---|
list | List all hosts |
show <alias> | Show host details |
add <alias> | Add new host |
edit <alias> | Edit host fields |
delete <alias> | Delete host |
search <query> | Fuzzy search |
test <alias> | Test SSH connection |
copy <from> <to> | Clone host config |
import <file> | Import from config file |
backup | Backup config now |
restore | Restore from backup |
config | Show config info |
Environment Variables
| Variable | Default | Description |
|---|
SSHM_CONFIG_PATH | ~/.ssh/config | SSH config file path |
SSHM_BACKUP_DIR | ~/.ssh/ | Backup directory |
SSHM_NO_COLOR | 0 | Disable ANSI color (1 to disable) |
SSHM_DEBUG | 0 | Enable debug logging (1 to enable) |
Exit Codes
| Code | Meaning |
|---|
| 0 | Success |
| 1 | Host not found |
| 2 | Parse error in config file |
| 3 | Runtime error |