Sshm
SSHM is a beautiful command-line tool that transforms how you manage and connect to your SSH hosts. Built with Go and featuring an intuitive TUI interface, it makes SSH connection management effortless and enjoyable.
Install / Use
/learn @Gu1llaum-3/SshmREADME
🚀 SSHM - SSH Manager
A modern, interactive SSH Manager for your terminal 🔥
SSHM is a beautiful command-line tool that transforms how you manage and connect to your SSH hosts. Built with Go and featuring an intuitive TUI interface, it makes SSH connection management effortless and enjoyable.
<p align="center"> <a href="images/sshm.gif" target="_blank"> <img src="images/sshm.gif" alt="Demo SSHM Terminal" width="800" /> </a> <br> <em>🖱️ Click on the image to view in full size</em> </p>✨ Features
🚀 Core Capabilities
- 🎨 Beautiful TUI Interface - Navigate your SSH hosts with an elegant, interactive terminal UI
- ⚡ Quick Connect - Connect to any host instantly through the TUI or the CLI with
sshm <host> - 🔄 Port Forwarding - Easy setup for Local, Remote, and Dynamic (SOCKS) forwarding with history persistence
- 📝 Easy Management - Add, edit, move, and manage SSH configurations seamlessly
- 🏷️ Tag Support - Organize your hosts with custom tags for better categorization; use the special
hiddentag to exclude hosts from the list while keeping them connectable - 🔍 Smart Search - Find hosts quickly with built-in filtering and search
- 📝 Real-time Status - Live SSH connectivity indicators with asynchronous ping checks and color-coded status
- 🔔 Smart Updates - Automatic version checking with update notifications
- 📈 Connection History - Track your SSH connections with last login timestamps
🛠️ Technical Features
- 🔒 Secure - Works directly with your existing
~/.ssh/configfile - 📁 Custom Config Support - Use any SSH configuration file with the
-cflag - 📂 SSH Include Support - Full support for SSH Include directives to organize configurations across multiple files
- ⚙️ SSH Options Support - Add any SSH configuration option through intuitive forms
- 🔄 Automatic Conversion - Seamlessly converts between command-line and config formats
- 🔄 Automatic Backups - Backup configurations automatically before changes
- ✅ Validation - Prevent configuration errors with built-in validation
- 🔗 ProxyJump/ProxyCommand Support - Secure connection tunneling through bastion hosts
- ⌨️ Keyboard Shortcuts - Power user navigation with vim-like shortcuts
- 🌐 Cross-platform - Supports Linux, macOS (Intel & Apple Silicon), and Windows
- ⚡ Lightweight - Single binary with no dependencies, zero configuration required
🚀 Quick Start
Installation
Homebrew (Recommended for macOS):
brew install Gu1llaum-3/sshm/sshm
Unix/Linux/macOS (One-line install):
curl -sSL https://raw.githubusercontent.com/Gu1llaum-3/sshm/main/install/unix.sh | bash
Windows (PowerShell):
irm https://raw.githubusercontent.com/Gu1llaum-3/sshm/main/install/windows.ps1 | iex
Alternative methods:
Linux/macOS:
# Download specific release
wget https://github.com/Gu1llaum-3/sshm/releases/latest/download/sshm-linux-amd64.tar.gz
# Extract and install
tar -xzf sshm-linux-amd64.tar.gz
sudo mv sshm-linux-amd64 /usr/local/bin/sshm
Windows:
# Download and extract
Invoke-WebRequest -Uri "https://github.com/Gu1llaum-3/sshm/releases/latest/download/sshm-windows-amd64.zip" -OutFile "sshm-windows-amd64.zip"
Expand-Archive sshm-windows-amd64.zip -DestinationPath C:\tools\
# Add C:\tools to your PATH environment variable
📖 Usage
Interactive Mode
Launch SSHM without arguments to enter the beautiful TUI interface:
sshm
Navigation:
↑/↓orj/k- Navigate hostsEnter- Connect to selected hosta- Add new hoste- Edit selected hostd- Delete selected hostm- Move host to another config file (requires SSH Include directives)f- Port forwarding setupH- Toggle hidden hosts visibilityq- Quit/- Search/filter hosts
Real-time Status Indicators:
- 🟢 Online - Host is reachable via SSH
- 🟡 Connecting - Currently checking host connectivity
- 🔴 Offline - Host is unreachable or SSH connection failed
- ⚫ Unknown - Connectivity status not yet determined
Sorting & Filtering:
s- Switch between sorting modes (name ↔ last login)n- Sort by name (alphabetical)r- Sort by recent (last login time)Tab- Cycle between filtering modes- Filter by name (default) - Search through host names
- Filter by last login - Sort and filter by most recently used connections
The interactive forms will guide you through configuration:
- Hostname/IP - Server address
- Username - SSH user
- Port - SSH port (default: 22)
- Identity File - Private key path
- ProxyJump - Jump server for connection tunneling
- ProxyCommand - Jump command for connection tunneling
- SSH Options - Additional SSH options in
-oformat (e.g.,-o Compression=yes -o ServerAliveInterval=60) - Tags - Comma-separated tags for organization
Port Forwarding
SSHM provides an intuitive interface for setting up SSH port forwarding. Press f while selecting a host to open the port forwarding setup:
Forward Types:
-
Local (-L) - Forward a local port to a remote host/port through the SSH connection
- Example: Access a remote database on
localhost:5432via local port15432 - Use case:
ssh -L 15432:localhost:5432 server→ Database accessible onlocalhost:15432
- Example: Access a remote database on
-
Remote (-R) - Forward a remote port back to a local host/port
- Example: Expose local web server on remote host's port
8080 - Use case:
ssh -R 8080:localhost:3000 server→ Local app accessible from remote host's port 8080 - ⚠️ Requirements for external access:
- SSH Server Config: Add
GatewayPorts yesto/etc/ssh/sshd_configand restart SSH service - Firewall: Open the remote port in the server's firewall (
ufw allow 8080or equivalent) - Port Availability: Ensure the remote port is not already in use
- Bind Address: Use
0.0.0.0for external access,127.0.0.1for local-only
- SSH Server Config: Add
- Example: Expose local web server on remote host's port
-
Dynamic (-D) - Create a SOCKS proxy for secure browsing
- Example: Route web traffic through the SSH connection
- Use case:
ssh -D 1080 server→ Configure browser to uselocalhost:1080as SOCKS proxy - ⚠️ Configuration requirements:
- Browser Setup: Configure SOCKS v5 proxy in browser settings
- DNS: Enable "Proxy DNS when using SOCKS v5" for full privacy
- Applications: Only SOCKS-aware applications will use the proxy
- Bind Address: Use
127.0.0.1for security (local access only)
Port Forwarding Interface:
- Choose forward type with ←/→ arrow keys
- Configure ports and addresses with guided forms
- Optional bind address configuration (defaults to 127.0.0.1)
- Real-time validation of port numbers and addresses
- Port forwarding history - Save frequently used configurations for quick reuse
- Connect automatically with configured forwarding options
Troubleshooting Port Forwarding:
Remote Forwarding Issues:
# Error: "remote port forwarding failed for listen port X"
# Solutions:
1. Check if port is already in use: ssh server "netstat -tln | grep :X"
2. Use a different port that's available
3. Enable GatewayPorts in SSH config for external access
SSH Server Configuration for Remote Forwarding:
# Edit SSH daemon config on the server:
sudo nano /etc/ssh/sshd_config
# Add or uncomment:
GatewayPorts yes
# Restart SSH service:
sudo systemctl restart sshd # Ubuntu/Debian/CentOS 7+
# OR
sudo service ssh restart # Older systems
Firewall Configuration:
# Ubuntu/Debian (UFW):
sudo ufw allow [port_number]
# CentOS/RHEL/Rocky (firewalld):
sudo firewall-cmd --add-port=[port_number]/tcp --permanent
sudo firewall-cmd --reload
# Check if port is accessible:
telnet [server_ip] [port_number]
Dynamic Forwarding (SOCKS) Browser Setup:
Firefox: about:preferences → Network Settings
- Manual proxy configuration
- SOCKS Host: localhost, Port: [your_port]
- SOCKS v5: ✓
- Proxy DNS when using SOCKS v5: ✓
Chrome: Launch with proxy
chrome --proxy-server="socks5://localhost:[your_port]"
CLI Usage
SSHM provides both command-line operations and an interactive TUI interface:
# Launch interactive TUI mode for browsing and connecting to hosts
sshm
# Connect directly to a specific host (with history tracking)
sshm my-server
# Execute a command on a remote host
sshm my-server uptime
# Execute command with arguments
sshm my-server ls -la /var/log
# Force TTY allocation for interactive commands
sshm -t my-server sudo systemctl restart nginx
# Launch TUI with custom SSH config file
sshm -c /path/to/custom/ssh_config
# Connect directly with custom SSH config file
sshm my-server -c /path/to/custom/ssh_config
# Add a new host using interactive form
sshm add
# Add a new host with pre-filled hostname
sshm add hostname
# Add a new host with custom SSH config file
sshm add hostname -c /path/to/custom/ssh_config
# Edit an existing host configuration
sshm edit my-server
# Edit host with custom SSH config file
sshm edit my-server -c /path/to/custom/ssh_config
# Move a host to another SSH config file (requires Include directives)
sshm move my-server
# Move host with custom SSH config file (requires Include directives)
sshm move my-server -c /pat
Related Skills
node-connect
334.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
82.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
334.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
82.2kCommit, push, and open a PR
