Skip to content

obolientsev/ssh-host

Repository files navigation

❯❯ ssh-host

Build Status zsh License: MIT

Zsh plugin to simplify interaction with SSH config, ssh, scp.

Table of Contents

Key Features

Interactive Host Selection
Browse hosts from .ssh/config with fuzzy search and live preview of connection details, port, key, and descriptions. Filter and navigate with keyboard.
Host Selection
Quick Host Setup
Add new hosts through guided setup. Plugin automatically manages SSH config with Include directive, keeping your main config clean. Supports ed25519 and RSA-4096 key generation with SSH agent integration.
Add Host
SCP Support
Upload files/directories with ctrl-u, download with ctrl-d. Auto-detects recursive transfers for directories.
SCP Support
Pin
Press ctrl-p to pin frequently-used hosts to the top of your list. Quick access to servers or most used environments.
Pin Host
Custom Descriptions
Press ctrl-e to add descriptions to hosts. Document server purpose, environment (prod/staging/dev), or notes.
Edit Description

Requirements

  • zsh >= 5.0
  • fzf - Fuzzy finder for interactive selection

Getting Started

  1. Install fzf

  2. 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
    1. Clone the repository:
    git clone https://github.com/obolientsev/ssh-host ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/ssh-host
    1. Add to your plugins list in ~/.zshrc:
    plugins=(ssh-host $plugins)
    1. Restart your shell:
    source ~/.zshrc
  3. Launch the plugin:

    ssh-host
  4. Follow the instructions to add your first host.

Key Bindings

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
Ctrl-U Upload file to selected host
Ctrl-D Download file from selected host
Esc Quit

Troubleshooting

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/.

About

Lightweight interactive zsh plugin for managing SSH config and keys

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages