No description
- Python 100%
| LICENSE | ||
| README.md | ||
| win-sshm.py | ||
win-sshm — SSH Connection Manager
A terminal UI and CLI for managing and launching SSH connections, written in
a single-file Python 3 script using curses.
Features
- Curses-based TUI with a host list, live filtering, and a detail pane
showing user, host, port, identity, tags, notes, and the resulting
sshcommand - Add, edit, and delete hosts from forms inside the TUI
- Connect to a host with
Enter(replaces the process withssh) - Upload your public key to a host with
ssh-copy-id, choosing from available keys in~/.ssh - Non-interactive CLI subcommands for scripting (
save,connect,list,remove,upload-pubkey) - Hosts are stored in a plain pipe-delimited file at
~/.sshm/hostswith0600/0700permissions
Requirements
Linux / macOS
- Python 3 (
cursesis included in the standard library) sshssh-copy-id(for key upload)
Windows
- Python 3
windows-cursesfor the TUI:pip install windows-curses- OpenSSH client (
ssh) — enable via Settings → Optional Features → OpenSSH Client (Windows 10/11) ssh-copy-idis not needed on Windows; key upload is handled natively via SSH
Installation
Linux / macOS
chmod +x sshm.py
# Optionally place it on your PATH
sudo ln -s "$(pwd)/sshm.py" /usr/local/bin/sshm
Windows
pip install windows-curses
# Optionally add the directory to your PATH and invoke as: python sshm.py
Usage
TUI
Run with no arguments to launch the interactive TUI:
sshm
Key bindings:
| Key | Action |
|---|---|
↑ / ↓ |
Navigate hosts |
Enter |
Connect via SSH |
a |
Add a new host |
e |
Edit selected host |
d |
Delete selected host |
u |
Upload public key |
/ |
Search / filter hosts |
r |
Reload host list |
q |
Quit |
In forms: Tab/↓ and ↑ move between fields and buttons, Enter
activates, Esc cancels.
CLI
sshm Launch TUI
sshm save <alias> -h HOST Save a host (-u user, -p port, -i identity, -t tags, -n notes)
sshm connect <alias> Connect to a saved host
sshm list [filter] List saved hosts
sshm remove <alias> Remove a host
sshm upload-pubkey <alias> Upload a public key via ssh-copy-id (-k key.pub)
Examples:
sshm save web1 -h 203.0.113.10 -u deploy -p 2222 -i ~/.ssh/id_ed25519 -t "prod,web"
sshm connect web1
sshm list prod
sshm upload-pubkey web1
Storage
Hosts are stored one per line in ~/.sshm/hosts (override with the
SSHM_DIR environment variable), in the format:
alias|user|host|port|identity|tags|notes
The directory and file are created automatically. On Linux/macOS restrictive
permissions (0700/0600) are applied; on Windows this step is skipped.
License
This project is licensed under the GNU General Public License v3.0.