-
Notifications
You must be signed in to change notification settings - Fork 0
SSH and tmux
When you mark a pane as an SSH connection, ClusterSpace wraps it in tmux automatically — so closing the pane (or losing your network, or crashing the app) never costs you the running command.
Open the manager:
- Status bar → SSH button
- Right-click any pane → SSH Servers
- Command palette → "ssh servers"
Backed by src/main/credentials-store.ts (encrypted via Electron safeStorage, fallback to base64 with a warning if the OS keychain is unavailable).
| Field | Notes |
|---|---|
| Name | Display label only |
| Host | Hostname or IP |
| Port | Default 22 |
| User | SSH user |
| Auth | Key (path to private key, optional passphrase) or Password (stored in keychain) |
| Initial directory | Optional cd <path> after login |
Click any row in the manager to edit. Removing a server doesn't kill running PTYs that used it; they keep running until you explicitly close them.
Under the hood, ClusterSpace invokes:
ssh -t user@host -p <port> [-i <keypath>] -- tmux new-session -A -s <session-name>-
-tforces a pseudo-tty (needed for interactive tmux) -
-Aattaches if<session-name>already exists, otherwise creates it -
<session-name>defaults toclusterspace-pane-<paneId-short>— unique per pane, so two panes connecting to the same host don't echo into each other
For password auth, ClusterSpace watches the SSH prompt and injects the saved password via the PTY input stream.
By default each new pane gets a unique session name: clusterspace-pane-<short>. You can override this at any time:
Right-click pane → Attach to tmux session… → pick from the list (key-auth) or type a name (any auth).
Two panes on the same host with the same session name would echo each other (both attached to the same tmux client). Unique names give you independent windows; if you want shared sessions, set them up explicitly via the picker.
The app was originally called Fleet Term; pre-rename sessions used names like fleet-term-pane-<short> or fleet-term-<server-short>. After the rename, your existing remote sessions kept their old names. The tmux picker shows a Legacy suggestion chip when it detects you're on a server you used pre-rename — one click attaches to the old name.
If you can't find a session you remember running, run tmux ls on the host directly to see what's actually there, then type the name in the picker manually.
The picker (src/renderer/components/TmuxSessionPicker.tsx) is a small modal with:
-
Existing sessions — auto-detected via
ssh user@host tmux list-sessions -F '#S'. Only works with key auth (no automatictmux lsfor password auth). -
Manual entry — type a session name; we
tmux new-session -A -s <name>it (idempotent — attaches if it exists, creates if not). - Legacy suggestion — one-click for the old fleet-term-naming convention if applicable.
- Cancel — close the picker without changing anything.
The same picker is used for adding a new tab to an existing pane (see Per-Pane-Tabs).
Closing an SSH pane (× button or context menu → Close) opens a confirm dialog:
| Option | What it does |
|---|---|
| Cancel | Don't close anything |
| Close pane, keep session (default) | Kills local PTY; remote tmux session keeps running. Reattach later. |
| Close pane and destroy session |
tmux kill-session -t <name> then kill PTY. The session is gone for good. |
This matches the close-tab behavior in Per-Pane-Tabs.
If your shell auto-starts tmux (e.g., your .bashrc does tmux attach || tmux), ClusterSpace's SSH command will nest you inside two layers of tmux. The outer one is the one ClusterSpace manages; the inner one is yours.
Two workarounds:
- Guard your auto-tmux line with
[ -z "$TMUX" ]so it only fires when not already in a session. - Use a per-pane override via Attach to tmux session… to attach explicitly to the inner one you want.
| Feature | Needs tmux on host? |
|---|---|
| Basic SSH terminal | No — set the pane to plain SSH (no auto-tmux wrap) via the right-click menu |
| Session persistence across pane close | Yes |
| Multi-tab pane to same host | Yes (each tab = its own tmux session) |
| Reattach after app restart | Yes |
If you're on a host without tmux and can't install it, you can still use ClusterSpace as a plain SSH terminal — you'll just lose persistence.
- Per-Pane-Tabs — multiple SSH+tmux sessions in one pane
- Terminal-Panes — the renderer and clipboard story
- Saved-Logins — for browser saved credentials (not SSH)
- Troubleshooting — common SSH/tmux errors
ClusterSpace · Issues · Releases · MIT License · Edit any page via the Edit button (top right of the wiki).
- Workspaces-and-Layout
- Terminal-Panes
- Per-Pane-Tabs
- SSH-and-tmux
- Browser-Panes
- Saved-Logins
- Command-Palette
- Broadcast-Mode
- Settings-and-Configuration
- AI-Overview
- AI-Providers
- AI-Chat-Panel
- AI-Tools-Reference
- Personas
- Skills
- Task-Templates
- Agent-Orchestration
- Fleet-Dashboard
- Goal-Runner-Overview
- Starting-a-Goal
- Success-Criteria
- Goal-Policy-and-Risk-Levels
- Critic-and-Replan
- Vision-Verification
- Goal-Dashboard