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
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 |
TUI Keybindings
| Key | Action |
|---|---|
Enter |
Connect to selected hosts |
Space |
Toggle host selection |
s |
Open session manager |
S |
Open snippets picker and send command |
H |
Run host health checks |
f |
Toggle favorite on current host |
v |
Toggle favorites filter |
n |
Toggle recent-hosts filter |
r |
Refresh hosts from sources |
h |
Open in-app help |
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
⭐ Star History
SSHplex - Because managing multiple SSH connections should be simple.
Metadata
Release files for sshplex 1.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sshplex-1.9.0.tar.gz | 113.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sshplex-1.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 229.6 kB
Release files / sshplex-1.9.0.tar.gz
| Download URL | sshplex-1.9.0.tar.gz |
|---|---|
| Size | 113.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce8af87f466344e2575ac7f31f680dd24e20804e428370e1253e4432dada9574
|
|
BLAKE2b-256 checksum How to use checksums |
494b6183cfeddcb785c14aeb1424705f702cfe74b2ac2830b4d6533e80aa479a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / sshplex-1.9.0-py3-none-any.whl
| Download URL | sshplex-1.9.0-py3-none-any.whl |
|---|---|
| Size | 116.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3d2895312ca3d3a10832d29926c027e78d80b408ffa2f3fb1e01939196ea0a9a
|
|
BLAKE2b-256 checksum How to use checksums |
6bb7eb14f5fcad3a7c4382e3ee786913a6ed4a70d5f5c961cf2e2836f4e7b277
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for sshplex 1.9.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.