Skip to content

SckyzO/zsh-sshinfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

zsh-sshinfo

A powerful and visually elegant Zsh plugin that summarizes your SSH connection details before connecting.

Banner Style

✨ Features

  • Pixel Perfect UI: Clean, modern summary with Unicode borders and 256-color support.
  • Recursive Tunnel Discovery: Automatically resolves full ProxyJump/ProxyCommand chains.
  • Dynamic Route Styles: Choose between a vertical Staircase view or a compact Inline view.
  • IP Resolution: Automatically resolves hostnames to real IP addresses.
  • Smart Completion: Advanced tab-completion that follows Include directives and parses known_hosts.
  • Non-Invasive: Wraps ssh but stays out of your way for simple commands.

🚀 Installation

Using Oh My Zsh

  1. Clone the repository into your custom plugins folder:
    git clone https://github.com/SckyzO/zsh-sshinfo.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/sshinfo
  2. Add sshinfo to your plugins list in ~/.zshrc:
    plugins=(... sshinfo)
  3. Restart your shell or run omz reload.

⚙️ Configuration

Display Styles

You can set the default route display style by exporting ZSH_SSHINFO_STYLE in your .zshrc:

# Default is "staircase"
export ZSH_SSHINFO_STYLE="inline"

On-the-fly Overrides

You can override the style directly on the command line:

ssh --inline my-host        # Force compact view
ssh --staircase my-host     # Force tree view

📸 Preview

Staircase Mode (Default)

 󰔶 SSH Connection to production-db

 ╭── CONNECTION
 │  👤 User     : root
 │  🌐 Host     : 10.0.5.2 (10.0.5.2)
 │  🔌 Port     : 22
 │
 ├── SECURITY
 │  🔑 Key      : ~/.ssh/id_ed25519
 │
 ├── NETWORK PATH
 │  🛤️ Route    : bastion [194.57.10.1]
 │                ╰─> production-db [10.0.5.2]
 │
 ╰───────────────────────────────────────────

Inline Mode

 ├── NETWORK PATH
 │  🛤️ Route    : bastion [194.57.10.1] ➜ production-db [10.0.5.2]

🛠️ Requirements

  • Zsh
  • Nerd Fonts (recommended for icons like 󰔶, 👤, 🌐)
  • ssh (OpenSSH)

📄 License

This project is licensed under the MIT License.

About

A Zsh plugin to display resolved SSH connection details before connecting.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages