Your SSH config, and sshbar's comments

Everything in sshbar's server list comes from one plain-text file you may already have: ~/.ssh/config. This chapter explains the file from scratch, then the comment markers sshbar understands.

1.1 - THE BASICS

What ~/.ssh/config is

When you run ssh, it checks a plain-text file at ~/.ssh/config for saved connection settings. Instead of typing this every time:

ssh -i ~/.ssh/key -p 2222 deploy@203.0.113.5

You save those settings once, under a short alias. Each entry starts with Host <alias>:

Host gateway
    HostName gateway.example.com   # the real address ssh dials
    User admin                     # who to log in as
    Port 22                        # the SSH port
    IdentityFile ~/.ssh/id_ed25519 # which key to use

Now ssh gateway connects with all of that. If you've never made this file, you can. ~ is your home folder, so the file lives at ~/.ssh/config. Create it with any text editor.

1.2 - THE MENU

How sshbar uses it

sshbar reads your real ~/.ssh/config and turns every Host alias into a clickable menu item. It never edits the file.

Wildcard hosts (Host *, Host db-?) and negations (Host !prod) are skipped. They're patterns, not real servers.
Include directives are followed, so a config split across several files still works.
Connections happen by alias, so whatever user, port, and key your config defines is exactly what's used.
1.3 - ORGANIZING THE MENU

sshbar's special comments

SSH ignores comment lines (anything after #), so sshbar uses them to organize the menu, without changing how ssh behaves at all.

# sshbar:group <name>

Begins a named group. Hosts below it appear under a collapsible <name> heading, until the next marker. Hosts before any marker sit at the top of the menu, always visible.

# sshbar:ignore

Placed inside a Host entry, hides that host from the menu. ssh can still use it; sshbar just doesn't show it.

# sshbar:group <name>
(inside a Host entry)

Overrides the group for just that one host, regardless of which section of the file it sits in.

1.4 - PUT TOGETHER

A full example

The config on the left produces the menu on the right:

Host gateway
Host laptop-vpn

# sshbar:group Production
Host prod-web
Host prod-db
Host prod-old
    # sshbar:ignore

# sshbar:group Personal
Host home-nas
Servers
gateway
laptop-vpn
Production
⌄
prod-db
prod-web
Personal
⌄
home-nas

gateway and laptop-vpn sit at the top, ungrouped and always visible. Then a Production group (hosts sorted alphabetically) and a Personal group. prod-old is hidden by its ignore marker.

sshbar, a free macOS menu-bar app for SSH
Manual Download hello@sshbar.app