Content
# sshm
> A pretty, AI-friendly SSH connection manager.
>
> Single binary on Win/Mac/Linux. Pretty `ls` with live status. Wizard `add`. Built-in MCP server for AI assistants (Claude Code, Cursor, Codex, Gemini CLI).
## Install
| Platform | Command |
|---|---|
| macOS / Linux (Homebrew) | `brew install michael-ltm/tap/sshm` |
| Windows (Scoop) | `scoop bucket add michael-ltm https://github.com/michael-ltm/scoop-bucket && scoop install sshm` |
| Anywhere (Go) | `go install github.com/michael-ltm/sshm/cmd/sshm@latest` |
| Direct download | [GitHub Releases](https://github.com/michael-ltm/sshm/releases) — tar.gz / zip per OS+arch |
## Quickstart
```
sshm pair # guided: alias, address, platform, description, tags
# Paste the printed one-line command on the target; sshm detects the user and verifies SSH.
sshm add # choose automatic pairing or advanced manual entry
sshm # terminal workspace (when run in a terminal)
sshm list # searchable inventory + details + safe action menu
sshm ls --plain # script-friendly server table
sshm c my-host # interactive shell
sshm exec my-host 'uptime'
sshm test --all # parallel reachability check through configured routes
sshm cleanup # guided review of unused server records
sshm download my-host /tmp/app.zip ./app.zip --resume --sha256 <hash>
```
## Optional encrypted cloud sync (preview)
[SSHM Cloud](https://sshm.yunmini.net) adds accounts, device presence, groups/tags,
and a browser console. SSH server metadata, private keys and saved passwords are
end-to-end encrypted. Existing local commands and MCP keep using local configuration.
```sh
sshm cloud register --username your-name --import-local
# On another device:
sshm cloud login --username your-name --import-local
sshm service setup # one-time migration of old credentials
sshm service install # background local service and optional sync
```
Use the cloud preview client from the console; the existing stable package does
not include these commands. Use `sshm update` for signed, confirmed updates and `sshm integrations install --app all --mcp` for optional AI setup. See [cloud setup, recovery and limitations](docs/cloud-sync.md).
Migrated credentials work across CLI/MCP processes and service restarts without
repeated vault unlock. Cloud failures affect synchronization, not local SSH.
Use `sshm service status` to inspect readiness and `service lock/unlock` for an
explicit device lock. See [local trust, migration and platform limits](docs/cloud-sync.md#默认本地-ssh-与本机信任).
## Features
- TOML config at `~/.config/sshm/config.toml` (XDG) or `%APPDATA%\sshm\config.toml` (Windows)
- Interactive `list`/`ls`: arrow-key server picker with connect, reachability,
pairing/repair, description editing, remote password change, cleanup protection,
default selection, and guarded delete. The workspace shows last SSH use and
on-demand TCP latency (`p`); see [terminal UI](docs/terminal-ui.md).
- First-class descriptions, groups, and tags for human browsing and AI intent lookup
- Plain `pair` guides you through alias, address, Windows/Linux/macOS platform,
with optional custom port, description, tags, and group. Windows guided setup
produces a readable script plus a launcher; other targets get a one-time command. It
installs or starts OpenSSH when needed, detects the target user, installs a
new key, and saves only after a real key-authenticated SSH command succeeds.
Windows uses the built-in capability by default, then a pinned/hash-verified
official ZIP fallback; setting offline `SSHM_OPENSSH_ZIP` bypasses the online attempt.
See [Windows file setup and read-only checks](docs/windows-pairing.md).
- SSHM-observed successful SSH authentication records last use separately from
reachability checks (sessions opened by other clients are not visible).
`cleanup` safely reviews idle records, protects referenced hosts, and
creates a private backup (`0600` on POSIX, current-user/LocalSystem ACL on Windows) before
removing selected config entries
- `add` (huh wizard) / `edit` / `rm` / `show`; exact-alias confirmation for destructive removal
- `connect` (interactive shell) / `exec` (one-off) / `test` (single + --all)
- `status` (remote resource snapshot) / `init` (baseline hardening)
- `gen-key` (encrypted ed25519 with automatic device protection; no plaintext recovery
sidecar) / `copy-id` (one-shot password, never stored). Automation can supply
`--passphrase-file` from a separately managed private file; see
[credential handling](docs/security.md#credential-handling).
- `upload` / `download` (single-file SFTP with `.part`, resume, SHA-256)
- **`mcp` — built-in MCP server** so AI assistants (Claude Code, Cursor,
Codex, Gemini CLI) can manage your servers — including layered SSH checks,
intent-based `find_servers` discovery,
background file transfer (`transfer_start`/`transfer_status`) and host-key
verification (TOFU). See [docs/ai-integration.md](docs/ai-integration.md).
- `--json` on supported non-streaming commands for scripting and AI integration
- `--redacted` masks secrets, IPs, and sensitive paths before JSON is shared
- Pretty list with unicode/ascii icons (auto-detected)
- Proxy/jump-host connections: per-host SOCKS5 (`proxy`), ProxyJump (`proxy_jump`), ProxyCommand (`proxy_command`); SOCKS5 auto-detected from `ALL_PROXY`/`HTTPS_PROXY` env vars (zero-config); failed proxy attempts fall back to direct
## AI integration
```
claude plugins marketplace add michael-ltm/sshm
claude plugins install sshm-skill@sshm
```
Then ask your assistant to "check the status of my prod server" or "deploy
the latest code to staging". sshm's MCP tools are audited, mask secrets, and
block dangerous commands. See [docs/ai-integration.md](docs/ai-integration.md)
and [docs/security.md](docs/security.md).
## Roadmap
- **v0.3** ✓ — Host-key TOFU verification (strict known_hosts still v1.0), parallel `exec_multi`, `upload`/`download` single files, `exec` timeout + detach — _shipped_
- **v0.4** ✓ — Proxy/VPN-aware dialing: SOCKS5 (`proxy`), ProxyJump, ProxyCommand; SOCKS5 auto-detected from env; automatic direct fallback — _shipped_
- **v0.5** ✓ — Secure key provisioning, encrypted key support, large-transfer-safe MCP/CLI file transfer — _shipped_
- **v0.6** ✓ — Deterministic project profiles, safe project-scoped execution, cross-platform detached logs, token-efficient AI skill — _shipped_
- **v0.7** ✓ — Interactive inventory manager, server descriptions, ranked AI host discovery, guarded password/removal workflows, remote reverse-lab guidance — _shipped_
- **v0.8** — One-line cross-platform pairing, responsive inventory picker,
import/export `~/.ssh/config`, tag/group filtering
- **v1.0** — Port forwarding, SFTP browse, signed release artifacts, strict known_hosts enforcement
See [docs/specs/2026-05-13-sshm-design.md](docs/specs/2026-05-13-sshm-design.md) for the full design.
## Release Process (maintainers)
Releases are automated by GoReleaser on tag push:
```
git tag v0.1.0 && git push origin v0.1.0
```
Required repo secrets: `HOMEBREW_TAP_TOKEN`, `SCOOP_BUCKET_TOKEN` — PATs with `contents:write` on `homebrew-tap` and `scoop-bucket`.
## License
MIT — see [LICENSE](LICENSE).
Connection Info
You Might Also Like
No recommendations available