Zsh plugin to simplify interaction with SSH config. Browse/search/connect to configured hosts. Securely add new configs. Pin/describe entries for better navigation.
- Interactive Management: Browse and connect to configured hosts with fzf-powered fuzzy search and live previews
- Secure Key Creation: Generate ed25519 or RSA-4096 keys with automatic SSH agent integration
- Host Organization: Pin frequently-used hosts and add descriptions for quick identification
- Non-Invasive: Separate SSH config file with automatic backups
- Minimal Dependencies: Uses native SSH tools for maximum compatibility
zsh>= 5.0fzf- Fuzzy finder for interactive selection
-
Install
ssh-host:Zinit / Antigen / Znap
Add to your
~/.zshrc:zinit load "obolientsev/ssh-host" # or antigen bundle obolientsev/ssh-host # or znap source "obolientsev/ssh-host"
or
Oh My Zsh
- Clone the repository:
git clone https://github.com/obolientsev/ssh-host ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/ssh-host- Add to your plugins list in
~/.zshrc:
plugins=(ssh-host $plugins)- Restart your shell:
source ~/.zshrc
-
Launch the plugin:
ssh-host
-
Follow the instructions to add your first host.
| Key | Action |
|---|---|
↑/↓ |
Navigate hosts |
Enter |
Connect to selected host |
Ctrl-N |
Add new host |
Ctrl-E |
Edit selected host description |
Ctrl-P |
Toggle pin status of selected host |
Esc |
Quit |
Too many authentication failures
Issue: SSH server rejects connection after trying too many keys. Happens when ssh-agent has multiple keys loaded and SSH tries them all before the correct one, exceeding server's MaxAuthTries limit (typically 6 attempts).
Fix: Add IdentitiesOnly yes to force SSH to use only specified keys, not all agent keys.
Update config:
Host problematic-host
HostName example.com
User myuser
IdentityFile ...
IdentitiesOnly yes # Add this line
Prevent globally: Add to ~/.ssh/config top:
Host *
IdentitiesOnly yes
Note
This plugin manages SSH configurations in a separate file to avoid conflicts with your existing setup. All generated keys are stored in ~/.ssh/ssh_host/keys/.
