Multiplex your SSH connections with style
Project description
Multiplex your SSH connections with style
SSHplex is a Python-based SSH connection multiplexer with a modern TUI. Connect to multiple hosts simultaneously using tmux or iTerm2, with sources from NetBox, Ansible, Consul, or static lists.
Features
- 🖥️ Modern TUI - Textual-based host selector with search, sort, and multi-select
- 🔌 Multiple Sources - NetBox, Ansible, Consul, static lists - use them together
- 📦 3 Mux Backends - tmux standalone, tmux + iTerm2, or iTerm2 native (macOS)
- ✏️ Config Editor - Built-in editor with compact source cards, static host rows, and full YAML pane
- 🔄 Broadcast Input - Sync commands across multiple SSH sessions
- 🔐 SSH Security - Configurable host key checking and retry logic
- 🚀 Fast Startup - Intelligent caching with configurable TTL
What Is New in QoL v2
- Static host manager in UI - Add and edit static hosts as rows (
name,ip,alias,user,port,key_path) instead of raw YAML blobs. - Per-host SSH preview - Preview effective SSH values from
ssh -Gin settings and from host selector (o). - Smarter table columns - Detect columns from live hosts/cache/imports, including SSH-oriented fields like
alias,user,port, andkey_path. - Better Sources UX - Provider toggles and collapsible import cards make large source configs easier to navigate.
- Rich YAML view - Side-by-side YAML edit + syntax-highlight preview for full config inspection.
Quick Start
# Install
pip install sshplex
# First-time setup (interactive wizard)
sshplex --onboarding
# Launch TUI
sshplex
Prerequisites
- Python 3.10+
- tmux (Linux/macOS) and/or iTerm2 (macOS)
- SSH key configured for target hosts
Multiplexer Backends
| Backend | Platform | Best For |
|---|---|---|
| tmux | Linux, macOS | Maximum compatibility, persistence |
| tmux + iTerm2 | macOS | Native UI + persistence |
| iTerm2 native | macOS | Simple setup, no tmux dependency |
Sources of Truth
| Provider | type |
Extra Dependency | Best For |
|---|---|---|---|
| Static | static |
None | Small lists, lab hosts, quick manual entries |
| NetBox | netbox |
None (included in base install) | Inventory-driven infrastructure with metadata |
| Ansible | ansible |
None | Reusing existing Ansible inventory files |
| Consul | consul |
pip install "sshplex[consul]" |
Service discovery and dynamic node catalogs |
| Git | git |
git binary in PATH |
Git-backed inventories with auto-pull (static or ansible YAML) |
Provider activation is controlled by sot.providers, and each source is configured as an item in sot.import.
Use multiple git imports and tune priority for deterministic overrides.
Local Demo (Consul + Ansible)
This repo includes a small demo setup that uses the same IP (192.168.31.216) with different host names.
# Start Consul + seed 3 demo nodes
docker compose -f demo/docker-compose.consul-demo.yml up -d
# Optional: inspect nodes
curl -s http://localhost:8500/v1/catalog/nodes | jq
Demo files:
demo/ansible-inventory-demo.ymldemo/docker-compose.consul-demo.ymldemo/sshplex.demo.yaml
Run with the bundled demo config:
sshplex --config demo/sshplex.demo.yaml
Documentation
| Guide | Description |
|---|---|
| Configuration | Full config reference with examples |
| Backends | Multiplexer backend options and setup |
| Troubleshooting | Common issues and solutions |
Installation Options
# Basic (tmux only)
pip install sshplex
# With Consul,DEV,Iterm2 support
pip install "sshplex[dev,consul,iterm2]"
Development
git clone https://github.com/sabrimjd/sshplex.git
cd sshplex
pip install -e ".[dev]"
# Run tests
pytest tests/ -v
# Quality checks
ruff check sshplex tests
mypy sshplex
License
MIT License - see LICENSE for details.
Author
Sabrimjd - @sabrimjd
SSHplex - Because managing multiple SSH connections should be simple.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sshplex-1.8.0.tar.gz.
File metadata
- Download URL: sshplex-1.8.0.tar.gz
- Upload date:
- Size: 103.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a2b7047993dcc0e698bd58988d6609e053002114549dbb7aa108a531a905a4f
|
|
| MD5 |
a30cde90210a9f87e141c8c86d9664d9
|
|
| BLAKE2b-256 |
0dedcd72fb9b5105409bcde60d9fd04715c971b6633f673da93d06c571d36146
|
File details
Details for the file sshplex-1.8.0-py3-none-any.whl.
File metadata
- Download URL: sshplex-1.8.0-py3-none-any.whl
- Upload date:
- Size: 108.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39f10a05e757beda54a372e3e884daf4eac4b6c088b50c2b3246f2bc827c00f8
|
|
| MD5 |
4c951af7eba6043227140629b3bfe301
|
|
| BLAKE2b-256 |
bd25ed1c522720eb1f0dcffef2400c3b7a3a0359cc43fa4a3f5170193a165270
|