sshelf

0
README.md

sshelf

A small terminal UI to manage SSH connections. Add servers once, then connect with a couple of keystrokes — no need to remember hostnames, users, or key paths.


Install

Homebrew (tap from GitVerse):

From source (need Go):

Version:


Quick start

Run with no arguments to open the interactive list:

  • ↑ / ↓ or j / k — move
  • Enter — connect to the selected server
  • n — add a new connection
  • e — edit the selected connection
  • d — delete the selected connection (with confirmation)
  • / — search/filter by name, host, user, shortcut, or description
  • q or Ctrl+C — quit

In the add/edit form: Tab or Enter = next field, Shift+Tab = previous field, Esc = cancel.

If you set a shortcut when creating or editing a connection, you can connect without opening the UI:


Where the config file lives

All connections are stored in a single JSON file. The program creates the directory the first time you save a connection (e.g. after adding one with n).

OSPath
macOS / Linux
~/.config/sshelf/connections.json
Windows
%AppData%\sshelf\connections.json

You can edit this file by hand, back it up, or put it in Dropbox/iCloud/git and symlink it into the path above.


Config file format

The file has a

version
and a
connections
array. Each connection can have:

FieldRequiredDescription
id
autoSet automatically when you add from the UI; include when editing by hand.
name
yesDisplay name in the list.
host
yesHostname or IP.
user
yesSSH username.
port
noSSH port (default 22).
identity_file
noPath to private key (e.g.
~/.ssh/id_rsa
).
password
noSSH password (fed automatically when ssh prompts; no external tools).
shortcut
noAlias for
sshelf <shortcut>
(e.g.
prod
,
db
).
description
noOptional note.

Example:


Sync between machines

The config is one file. To use the same connections on several computers:

  • Copy
    ~/.config/sshelf/connections.json
    (or sync the whole
    ~/.config/sshelf
    folder) via your usual backup/sync (git, Dropbox, iCloud, etc.), or
  • Create a symlink from
    ~/.config/sshelf/connections.json
    to the file inside your synced folder.

Requirements

  • To run: SSH in your PATH (the tool runs
    ssh
    under the hood).
  • To build: Go 1.21+.

License

MIT