Skip to content

[Feature Request] Native SSH support for running workspaces/sessions on remote machines #82

Closed

Description

@adamatan

Problem / use case

I run Claude on a few always-on machines: two Raspberry Pis at home and an EC2 instance on AWS. Right now the only way to work with those sessions from Termic is to SSH in manually from a plain terminal outside the app, so none of Termic's workspace UI (tabs, file tree, diff pane, sidebar, sandboxing) applies to that work. Every terminal in Termic (shell, agent CLI, custom command) spawns a local PTY via portable-pty on the machine running Termic itself, and there's no way to point a workspace at a remote host instead.

Concretely: I want to keep Termic's workspace UI on my laptop, but have the actual git worktree, agent process, and shell live on one of these remote boxes over SSH, the way e.g. VS Code Remote-SSH or Tailscale-backed dev environments do.

Current behavior

  • All PTYs are spawned locally (src-tauri/src/lib.rs, via portable-pty); there's no remote-host concept anywhere in Workspace/Project types.
  • ~/.ssh shows up only as a sandbox secrets path to deny/allow (src-tauri/src/sandbox.rs, docs/sandbox.md) — unrelated to remote execution.
  • The only "SSH" workflow today is typing ssh <host> as an arbitrary custom command in a locally-spawned terminal (CustomCommandDialog.tsx), which doesn't extend to file tree, diff pane, or worktree creation against the remote filesystem.

Proposed solution

Add native remote-workspace support over SSH:

  1. A Project can be an SSH host + repo combo, not just a local repo path: host, user, identity file / agent-forwarding, and a repo path on that host. Every workspace (worktree) created under that project lives on the remote host, inheriting its connection config, so remote-vs-local is decided once per project rather than fiddled with per workspace.
  2. PTY spawn over SSH instead of local portable-pty for any workspace under a remote project (e.g. shell out to ssh with a PTY, or use a Rust SSH client crate directly for tighter control over env/signals).
  3. Remote file/git operations: file tree reads, diff pane, and worktree creation (git worktree add etc.) need to operate against the remote filesystem, likely via SFTP or ssh <host> git ... rather than local std::fs/git2.
  4. Sandbox interaction: decide how (or whether) the existing sandbox-exec model applies when the process itself is remote — likely sandboxing happens on the remote host's side, if at all.
  5. Auth: rely on the user's existing ~/.ssh config/agent rather than storing credentials in Termic.

Scope / open questions

  • Do we shell out to the system ssh/scp binaries (simplest, reuses user's existing config/known_hosts) or use a Rust SSH library for more control?
  • How much of the file tree / diff / editor experience needs to work remotely for a first cut vs. just remote terminals (shell + agent) with local-only file browsing disabled?
  • Latency/perf: xterm.js output over a real network hop is a different perf profile than a local PTY, worth prototyping before committing to UI changes.
  • Per-project key override: do we let a project specify its own identity file (e.g. a dedicated key for the EC2 box vs. the Pis), overriding whatever ~/.ssh/config would normally pick for that host, or always defer to the user's existing SSH config?

Happy to scope this down to a v1 (remote shell + agent terminal only, no remote file tree) if that's a better starting point.

Activity

  1. adamatan commented on Jul 16, 2026

    @adamatan
    ContributorAuthor

    /assign

  2. ssx commented on Sep 7, 2026

    @ssx

    ah @simion - you're right. It does.

  3. simion commented on Sep 7, 2026

    @simion
    Owner

    @ssx @adamatan i'll have my agents study what implementations are out there in the OSS world and design the best one 🤝

  4. wagoodman commented on Sep 11, 2026

    @wagoodman
    Contributor

    Shout out if you'd like an extra set of hands on this, happy to lend some time to this.

  5. simion commented on Sep 11, 2026

    @simion
    Owner

    @wagoodman that would be super helpful. I'm super busy right now, changed jobs and ramping up on the project, and home help would be appreciated.
    We can discuss and settle design here

  6. wagoodman commented on Sep 14, 2026

    @wagoodman
    Contributor

    In terms of questions:

    1. Do we want "Host" to be a Project property, frozen onto each task? Or do we want to be able to select on each new task what host it might run on (with maybe project-level defaults)?

    I also have a few thoughts as to what this might look like / how it might work:

    1. Transport is the system ssh binary with a termic-owned ControlMaster, so ~/.ssh/config (SSM, ProxyJump, 1Password, FIDO) just works. I don't think russh as the primary transport is the way to go since it would require reimplementing ssh_config, agents, prompts, ProxyJump... and its config crate lacks Include/Match.

    2. On the host would run termic-remote, one small static binary (linux-musl, x86_64 + aarch64) with four roles:

    • connect bridges the pipe,
    • one replaceable server per user does the work,
    • one hold process per PTY keeps each agent alive, and
    • cli is the host-side termic.

    One stdio stream per host carries PTY bytes, git/exec, fs, and status. This binary would be copied to the host on the first connection. In terms of prior art, every multi-backend tool that scaled past two backends (DevPod, Coder, Zed, VS Code Remote) converges on the same general shape: a thin, backend-specific byte pipe to the target, plus a self-injected agent on the target that does everything else (PTY, fs, forwarding, credentials, idle shutdown). The backend-specific part shrinks to "run this argv on the target with stdio piped".

    1. I think the expectation is that agents survive drops, sleep and quit. Reconnect resumes by byte offset; after an app restart a tab reattaches from a server-side vt100 snapshot. Upgrades replace the server and never touch holders, so termic releases do not kill agents.

    2. I feel that there should be sandboxing available on the remote host optionally. That is, assuming that the remote host environment doesn't need sandboxing I think is a bad call or one we might regret later.

  7. ssx commented on Sep 14, 2026

    @ssx

    @wagoodman from my view, agree with that all. In terms of host, that's a really good question. I do suspect that I'll have one termic box for work and one for personal so setting per-project would make that fairly trivial. Alternate is per profile?

    Also agreed with the sandboxing too - would be useful to have that in from the start.

  8. wagoodman commented on Sep 21, 2026

    @wagoodman
    Contributor

    It sounds like we're generally head nodding to adding a back end daemon that is persistent on the remote host; There's a specific call out in the CLAUDE.md that this needs sign off from a maintainer, so want to call that out loudly.

    Getting into a few more details, I think "Remote" is a third "realm". From what I can tell today, there are two realms: Docker and LoginRealm. An initial read hints that we should make remote a third "Remote" realm that's behind the same spawn, env, and file rules.

    I want to try to not degrade any functionality unless it's really necessary. So for instance, I think it's tempting to initially degrade functionality LSP, the PR card, usage reporting, and MCP in order to get a V1 of the feature across the finish line. However, I think that is gonna be a little too surprising for the user and is ultimately gonna make it harder to get V2 across the finish line (where these things are included in the remote functionality). For that reason I think we should by default imagine features are included as part of this feature and exceptions are made along the way.

    Let me talk through some of the assumptions with LSP... the server would start the language server next to the files and stream its traffic over the same pipe, like a PTY. That's what VS Code Remote and Zed do. There are some implied costs with this:

    • language servers have to be installed on the remote host, same as the agent CLIs
    • completions pay one network round trip
    • a policy call: resolution prefers binaries from inside the checkout (node_modules/.bin, .venv/bin) and runs them unsandboxed (that's already true locally, so a remote host should follow the local policy rather than use it as a reason to skip LSP).

    For the PR card, today gh/glab run drives this so that still needs to live on the local host. But for git fetch/push, the remote host would need these credentials... a deploy key, gh as credential helper, or an HTTPS token.

    I think we want to avoid being a credential distribution hub though, so by default termic shouldn't copy any credentials from the local host to the remote host.

    The next step is probably checking in a plan around this -- trying to talk through some of the lower level details here will get pretty verbose. I'll work on that next.

  9. nikhilweee commented on Nov 6, 2026

    @nikhilweee
    Contributor

    Remote support would be super helpful. I was doing some reasearch and turns out a few other agent managers already support this, including https://github.com/stablyai/orca, https://github.com/herdrdev/herdr, https://github.com/manaflow-ai/cmux and others. It would be great to see this in termic as well. I'm not sure I understand the current state of this feature, is anyone actively working on it?

  10. simion commented on Nov 6, 2026

    @simion
    Owner

    I have remote execution and remote control via mobile app implemented and tested end to end by an agent, not yet by me :)

    This month will be delivered for sure

  11. 113 remaining items

  12. simion commented on Nov 24, 2026

    @simion
    Owner

    Shipped in v2.0.5.

    Settings > Servers > Add a server: type what you'd put after ssh. Termic checks the connection, installs termic-server on the box over your own ssh (no sudo, no internet needed there), and the box's projects show in the sidebar like local ones: tasks, tabs, file tree, editor, diff, git, run and setup scripts. Agents keep running when the laptop sleeps.

    Linux and macOS, x86_64 and ARM. Sandboxing on the box isn't done yet.

    Docs: https://termic.dev/docs/remote/

    Settings > Servers

    A server task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions