A 30-Minute Guide to Effortless SSH Management with SSHM

How to turn a messy ~/.ssh/config into a searchable, sortable, and shareable address book—without learning new commands.


1. Why SSH Management Still Hurts in 2025

1.1 Three Everyday Scenarios

Situation Current Habit Pain Point
First day on the job, handed 30 server addresses Copy-pasting every host block into ~/.ssh/config One typo, one failed connection, one late night
2 a.m. incident response Hunting through grep history for the right hostname Fatigue leads to connecting to production instead of staging
Sharing a jump-box in the team Keeping ProxyJump strings in a shared note Format drifts, keys expire, no audit trail

The bigger truth: once your list exceeds ten hosts, muscle memory stops working.


2. Meet SSHM in One Sentence

SSHM is a single-binary CLI tool written in Go that turns your existing ~/.ssh/config into an interactive, searchable dashboard—no migration, no new syntax, no surprises.


3. Installation Takes Three Minutes

3.1 Linux & macOS (one-liner)

curl -sSL https://raw.githubusercontent.com/Gu1llaum-3/sshm/main/install/unix.sh | bash

What the script does:

  1. Detects CPU architecture
  2. Downloads the matching release
  3. Places the binary in /usr/local/bin with executable rights

3.2 Windows (PowerShell one-liner)

irm https://raw.githubusercontent.com/Gu1llaum-3/sshm/main/install/windows.ps1 | iex

Close and reopen your terminal, then type sshm. If you see the welcome screen, you’re done.


4. First Launch: Zero-Config Hello World

Open any terminal and run:

sshm

If you already have hosts in ~/.ssh/config, they appear immediately.
If the file is empty, SSHM invites you to add your first entry.


5. Core Workflow—Keyboard Only, Mouse Optional

5.1 Add a Host (a)

  • Press a
  • Fill the form (hostname, user, port, key, jump host, tags)
  • Hit Ctrl+s to save

SSHM writes the block back to ~/.ssh/config with an extra comment line for tags.

5.2 Edit a Host (e)

  • Arrow keys to highlight
  • Press e
  • Change any field
  • Ctrl+s to confirm

5.3 Delete a Host (d)

  • Highlight host
  • Press d
  • Type yes to confirm

SSHM always creates a .bak file first.

5.4 Connect (Enter)

  • Highlight host
  • Press Enter
  • SSH session starts immediately if keys are set up

6. Tags and Search: When the List Hits 100+

6.1 Tagging Syntax

# Tags: production,web,frontend
Host web-prod-01
    HostName 192.168.1.10
    ...

Any comma-separated list works. Tags are stored as comments, so native SSH never breaks.

6.2 Search & Filter

  • / opens the search bar
  • Type prod → instant filter
  • Tab cycles between “by name” and “by last login” sorting

7. Command-Line Mode for Scripts

Task Example
Non-interactive add sshm add api-prod
Use custom config sshm -c /opt/project/ssh_config
Edit specific host sshm edit jump-box

8. Anatomy of a Clean SSHM Config

SSHM does not invent new grammar. It only adds one line of metadata:

# Tags: production,web,frontend
Host web-prod-01
    HostName 192.168.1.10
    User deploy
    Port 22
    IdentityFile ~/.ssh/production_key
    Compression yes
    ServerAliveInterval 60

Everything else is ordinary SSH syntax—Ansible, Terraform, or plain ssh will still work.


9. Frequently Asked Questions

Q1: Will SSHM overwrite my 200-line legacy config?
A: No. It backs up to ~/.ssh/config.bak before every change.

Q2: Where is the Windows config file?
A: %USERPROFILE%\.ssh\config. SSHM creates the directory if missing.

Q3: How do I format ProxyJump?
A: Same as native SSH: user@bastion:2222.

Q4: Can I use multiple keys for one host?
A: Yes. In the “SSH Options” field, add -o IdentityFile=~/.ssh/key2. SSHM expands it correctly.


10. Real-World Tips

10.1 Pairing with Ansible

sshm                    # find host
ansible-playbook -i web-prod-01, deploy.yml

10.2 tmux Workflow

sshm  # select web-01 → Ctrl+b+"  (split vertically)
sshm  # select web-02 → Ctrl+b+%  (split horizontally)

10.3 CI/CD Pipeline Snippet (GitHub Actions)

- name: Add staging host
  run: |
    sshm add staging \
      --hostname ${{ secrets.STAGE_IP }} \
      --user deploy \
      --identity-file ~/.ssh/stage_key

11. Quick Source Tour (for the Curious)

sshm/
├── cmd/           # Cobra CLI entry points
├── internal/
│   ├── config/    # Parse & write ~/.ssh/config
│   ├── ui/        # Bubble Tea TUI layer
│   └── history/   # Track last login timestamps
├── install/       # Unix & Windows install scripts

The binary is self-contained; no runtime dependencies.


12. Release Matrix

Platform File Direct Link
Linux x86_64 sshm-linux-amd64.tar.gz Latest Release
Linux ARM64 sshm-linux-arm64.tar.gz Latest Release
macOS Intel sshm-darwin-amd64.tar.gz Latest Release
macOS Apple Silicon sshm-darwin-arm64.tar.gz Latest Release
Windows sshm-windows-amd64.zip Latest Release

(All links point to the GitHub “latest” redirect.)


13. Closing Thoughts

SSHM will not replace your SSH client, nor does it try to.
Its only promise is to shrink the “find the host” step from minutes to seconds.
When that friction disappears, you can focus on what actually matters—shipping code, fixing bugs, or simply getting back to sleep.