Add remote SSH sessions (Phase 1): remote projects, Connect, Browse, host management - #76
Closed
HAN-oQo wants to merge 1 commit into
Closed
Add remote SSH sessions (Phase 1): remote projects, Connect, Browse, host management#76HAN-oQo wants to merge 1 commit into
HAN-oQo wants to merge 1 commit into
Conversation
HAN-oQo
force-pushed
the
feat/remote-ssh-phase1
branch
from
July 13, 2026 09:24
6403e8a to
efa6e46
Compare
Run Claude Code and shells on remote hosts over SSH. Remote hosts and directories are first-class projects alongside local ones — no local-only assumption anymore. - shell-profiles + remote-hosts: SSH shell profiles (mirrors the existing WSL wrapped-command pattern), ~/.ssh/config parsing, remote command assembly (single-quoted to survive ssh's argv re-parse), ControlMaster multiplexing. - main.js: open-terminal remote branch (skips local-path checks, local cwd=$HOME, no MCP/shim), plus IPC for remote projects, interactive connect, remote dir browse, host save/test, and write-to-~/.ssh/config. - session-cache: persisted remote projects injected into the sidebar; live remote sessions group under them (remote Claude reads as a Claude session). - renderer: Add Project (Local | Remote SSH) with "+ Add new host", inline Connect with structured password / host-key popups (no raw terminal), remote directory browser, host management in Settings, SSH badges. - 30 unit tests (node --test). Auth stays with the user: passwords/passphrases/passkeys/host-key confirmations are entered by the user; nothing is stored. Remote session indexing/search (Phase 2), fork/resume on the remote (Phase 3), and IDE-over-SSH (Phase 4) are deferred — see the PR description. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
HAN-oQo
force-pushed
the
feat/remote-ssh-phase1
branch
from
July 13, 2026 09:33
efa6e46 to
716bd5c
Compare
This was referenced Jul 13, 2026
Contributor
Author
|
Superseded by #78, which combines remote-SSH Phase 1–3 into a single PR for easier review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds remote SSH session support to Switchboard. Today Switchboard is local-only — it reads
~/.claude/projectsoff the local disk and spawns terminals against local shells. This PR lets you run Claude Code (and shells) on remote hosts over SSH, with remote hosts and directories treated as first-class projects alongside local ones.What's new
1. Remote projects — add a host + directory like any project
Add Projectnow has a Local folder | Remote (SSH) choice. Pick a host, choose a remote directory, and it appears in the sidebar with anSSHbadge. Its+launches Claude/shell on that host at that path.2. Interactive Connect — verify/authenticate in place
Connect runs
sshin the background and turns green when established (connection kept warm viaControlMaster, so Browse/sessions are instant afterward). A popup appears only when the host needs interaction — never a raw terminal.Password / passphrase (masked field):
First-connect host-key verification (Yes/No):
3. Remote directory browser
Navigate the remote filesystem and pick a directory, just like the local folder picker (backed by
lsover the shared SSH connection).4. Host management
~/.ssh/confighosts are imported automatically. You can also add hosts manually (identity file + extrassh -ooptions for legacy/deprecated servers), test/connect them, and optionally write a manual host into~/.ssh/config.Add-host form (with example option chips), and the Remote Hosts settings section:
5. Launching remote Claude / shell
A remote project's session dialog offers Start Claude and Open shell at the chosen remote directory:
How it works
shell-profiles.js,remote-hosts.js): an SSH profile mirrors the existing WSL "wrapped command" pattern. The remote command runs in a login+interactivebashso the remotePATHis set up. The payload is single-quoted to survivessh's argv re-join + remote-shell re-parse (handles spaces/quotes in paths).remoteProjects) and inject into the sidebar via a syntheticssh://<host>/<dir>path; live sessions group under them.ControlMastermultiplexing means one authentication is reused by Browse and subsequent sessions.Testing
node --test) covering SSH arg assembly,~/.ssh/configparsing, the quoting/transport (verified against a faithfulsshre-parse), remote-command assembly, host config, andlsparsing.Roadmap
Remote SSH support ships in phases, ordered by effort‑to‑value — each is independently useful and lands as its own PR. This PR is Phase 1.
~/.ssh/config). No DB/schema changes.sourcecolumn to the cache/search tables.ssh -R) so remote proposed diffs / file opens land in Switchboard's side panel (behind a setting).Why this order: Phase 1 delivers the core "run Claude Code on my server" value with the least new machinery (reuses the
node‑pty+ shell‑profile path, mirroring how WSL is modeled); Phase 2 unlocks history, search, and resume; Phase 3 adds richer IDE workflows. Nothing later blocks shipping this one.(Remote Control —
claude --remote-controlfor live cross-device mirroring — is orthogonal to local-vs-remote and is tracked separately, not part of this roadmap.)