Skip to content
martinbcgPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

ssht

ssht is a lightweight helper around ssh that uses ~/.ssh/config as the source of truth.

It keeps the standard OpenSSH workflow intact and only adds:

  • alias + description listing
  • fzf-based picker in ssht
  • simple add, rm, and edit commands
  • a tiny ssh wrapper so you can run ssh c <alias>

Why this approach

  • ~/.ssh/config is the standard and already works with ssh, scp, rsync, sftp, and editors like VS Code Remote SSH.
  • The tool stays lightweight because it does not need its own database.
  • Descriptions are stored as comments directly above each Host block.

Example:

# desc: Production app server
Host app-prod
  HostName 203.0.113.10
  User deploy
  Port 22
  IdentityFile ~/.ssh/app-prod.pem

Commands

ssht
ssht list
ssht add
ssht rm app-prod
ssht edit app-prod
ssh c app-prod

ssht opens an fzf picker to choose the target.

  • Type to filter
  • Up / Down to move
  • Enter to connect
  • Esc / Ctrl-C to cancel

Example TUI:

Type to filter. Enter connects. Esc cancels.
Alias                   Description                     Target
> app-prod              Production app server          deploy@203.0.113.10
  analytics-dev         Analytics box                  ubuntu@198.51.100.25
  staging-web           Staging frontend               deploy@203.0.113.20

Install

Clone the repository and run:

./install.sh

By default this installs symlinks to:

~/.local/bin/ssht
~/.local/bin/ssh

If you want a different install location:

INSTALL_DIR=/usr/local/bin ./install.sh

Requirements

  • OpenSSH client (ssh)
  • Bash
  • fzf

Install fzf on macOS with:

brew install fzf

Configuration format

ssht reads entries from ~/.ssh/config.

Descriptions use a # desc: comment directly above the Host block:

# desc: Analytics box
Host analytics-dev
  HostName 198.51.100.25
  User ubuntu
  IdentityFile ~/.ssh/analytics-dev.pem

Portability

To install on another machine:

  1. Clone the repository.
  2. Run ./install.sh.
  3. Copy or sync your ~/.ssh/config and SSH keys.
  4. Ensure ~/.local/bin is in PATH.

Notes

  • ssht writes directly to ~/.ssh/config.
  • ssht uses fzf, and ssht list prints a plain list.
  • ssh c <alias> is handled by the installed wrapper, and every other ssh call passes through unchanged.
  • The tool expects one primary alias per Host block.
  • Wildcard Host entries are ignored in the list.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages