Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                

SSH worktrees

Run coding agents and git worktrees on remote Linux, macOS, or Windows machines over SSH with managed Orca servers, port forwarding, and MFA support.

Orca can drive agents on remote machines over SSH — useful for long-running builds, GPU boxes, or any environment where your laptop isn't the right place to run the work.

SSH remote workspace — agents run on the remote host, the editor and diff stay local
SSH remote workspace — agents run on the remote host, the editor and diff stay local

Add an SSH target

  1. Open Settings → SSH.
  2. Click Add Target. The host form opens in a modal (not inline under the list), so Host, Advanced, and Save stay reachable even with a long host list. Edit uses the same dialog and shows the target label plus user@host:port.
  3. Fill in host, user, port, and optional identity file — or open the OpenSSH config picker in the same dialog to search ~/.ssh/config (including Included files), pick one host, and prefill the form. Hosts already saved in Orca show an In Orca badge. You can still import hosts in bulk from config when that flow is available.
  4. If the key is passphrase-protected, Orca will prompt the first time.
  5. Click Test to verify connectivity, then Save.

Dirty add/edit forms ignore outside clicks so an accidental click away does not discard your fields; use Escape, Cancel, or × to discard.

Orca won't add a second target for a machine already in Orca. When it imports ~/.ssh/config (on launch, from Add all, or from Settings), it asks OpenSSH (ssh -G) where each new alias connects: host, port, user, and jump host or proxy command. It skips an alias that resolves to the same place as a saved target, and the picker shows that alias as In Orca. A different port, user, ProxyJump, or ProxyCommand stays a separate target. Hostnames are compared case-insensitively; SSH usernames keep their case. An alias without HostName connects to its own name, so it matches an IP target only if you set HostName to that IP. Orca doesn't look names up in DNS. If ssh -G isn't available, aliases are matched by name only.

The import reads Host blocks only. It adds each concrete alias of a Host line and skips patterns with *, ?, or !. A Match block adds no target: a Match line ends the Host block above it, and the import ignores its lines until the next Host line. A tool that writes its own SSH config blocks can use Match originalhost <name> instead of Host <name> to keep a machine out of the import. Orca expands Include files in place before it parses, so a Host block in an included file is imported even when the Include line is inside a Match block.

When you remove a target that came from ~/.ssh/config (in Settings, or with orca host rm), the passive import (on launch, Sync ~/.ssh/config, or Add all) does not add its alias back. Restore removed hosts… in Settings → SSH brings it back.

Host key verification

Orca checks built-in SSH connections against your effective OpenSSH known_hosts files and keys it previously saved. Existing matches connect silently. With the default policy, Orca accepts and remembers a host on first contact and shows its fingerprint; StrictHostKeyChecking yes rejects unknown hosts, while no / off accepts without saving a trust record.

A changed, revoked, or unexpectedly different key type is rejected before Orca asks for a password or key passphrase. If you intentionally rebuilt or reprovisioned the host, verify its new fingerprint first, then follow the recovery path in the error. For a known_hosts mismatch, Orca provides the appropriate ssh-keygen -R command (including the bracketed host and port when needed).

Use a target

When creating a worktree, choose an SSH target instead of Local. Orca will:

  • Create the git worktree on the remote host.
  • Run agents remotely through the SSH connection.
  • Sync file events so the editor, diff, and browser still feel local.

On the first connect, Orca installs its managed server on the host over your own SSH connection; Settings lists these under Orca on your SSH hosts. Your code and files stay where they are. Only Orca's list of projects, tabs, and terminals moves to the host.

Advanced connection options

Open Settings → SSH, edit a target, and expand Advanced Connection when the host needs a proxy, jump host, or SSH multiplexing override. Orca enables Reuse SSH connection for faster setup by default, which uses OpenSSH connection reuse on macOS and Linux so setup commands do not each pay a fresh SSH handshake. Turn it off only for hosts whose SSH policy rejects multiplexed sessions.

Reconnect on launch is on by default: hosts that were connected when you quit reconnect when Orca starts. Turn it off for a host you only want on demand, such as a machine that is often asleep or off the network. Orca then leaves it, and any Orca server reached through it, disconnected at launch, and its workspaces show Connect until you connect it. Scheduled automations on that host are skipped until then.

Passphrases

Passphrases are held in memory for the life of the Orca session. Closing Orca clears them. You can opt into a longer TTL under SSH settings.

Multi-factor sign-in

Hosts that ask for a verification code or another keyboard-interactive prompt (a one-time password, an MFA challenge, or a similar prompt) work over the built-in connection: Orca relays the prompt to you and forwards your answer. If the prompt is part of a scripted setup step, it is deferred to a step you can answer rather than failing the connect.

If the built-in client and host have no compatible SSH algorithm, Orca retries through your system ssh, which can use the algorithms configured for that installation.

Status

Remote worktrees show a chip with live SSH status — green connected, yellow reconnecting, red disconnected. While an SSH host is still connecting, Orca can list workspaces from persisted local metadata so the sidebar is not empty until the live provider comes up; those rows refresh to authoritative remote state once the connection settles. Disconnects don't kill running agents; Orca reconnects and re-attaches, replaying scrolling output and restoring full-screen app panes from their rendered frame instead of returning them blank or fragmented. Keystrokes you type while a restored SSH terminal reattaches are kept, not dropped. When a host drops, the affected workspace card can show an inline Connect / reconnect control so you can recover without opening a terminal overlay or hunting the status bar. If an SSH connection drops with a "Multiplexer disposed" style failure, Orca recovers automatically instead of leaving the pane stuck until you restart. Agent status (working / idle / blocked) propagates over SSH the same way it does locally, so the sidebar and Agents feed reflect remote agents in real time.

Sessions across app close

Closing the desktop app no longer kills your remote PTY sessions. They live on the host's managed Orca server, so they survive Orca closing on your laptop. When you reopen the app and reconnect to the target, the sessions are restored to their tabs in the attached state, with their scrollback intact. A structured chat on a managed server keeps its provider loaded while a reply is running or a question is waiting, so an approval is still there after the desktop disconnects. Losing contact with a host is not evidence that its work stopped, so check the host before starting a second agent on the same worktree.

Reconnect and restart

Open files, live agent tabs, and paused Claude or Codex resume offers survive an SSH reconnect and an app restart, so the workspace comes back the way you left it. Keys you type while the connection is down are delivered exactly once and in order when it returns, and a pane's scrollback and size survive the reconnect. Open tabs reattach after a managed server update. Tabs you closed long ago no longer return as empty shells, and clicking an SSH worktree whose last tab you closed opens a fresh terminal.

Shell startup files that print text, folders with tens of thousands of entries, and 64-bit ARM Linux servers no longer break or drop the connection. When two machines share a path, files, browser tabs, links, and drag-and-drop stay on the machine they belong to.

The orca CLI on an SSH host

By default, orca commands run on an SSH host reach only that host's own terminals and orchestration messages. An agent there can still report back to a coordinator that dispatched it, but it can't reach your other hosts, desktop control, accounts, or settings. To let that host's agents create worktrees, open terminals, or dispatch work through orca, turn on Allow this host's orca CLI to control Orca for that host (Settings → SSH → edit the host → Advanced Connection). Terminals carried over from v1.4.224 do not have orca; run orca commands in a new terminal on the same host.

When deleting an SSH workspace that Orca cannot delete on the host, Remove from Orca removes it from the app and leaves its files on the host.

Downloading remote files and folders

Right-click in the SSH worktree file explorer:

  • File → Download — native save dialog; copies the file to your laptop.
  • Folder → Download Folder — recursive download into a folder you choose (desktop only).

Orca uses the same SSH transfer path as the connection. Folder download appears only when the connection advertises recursive folder transfer (typically full SFTP). Connections that stay on system OpenSSH-only transfer may still download files but not show Download Folder.

This is a desktop-only action — the web client doesn't expose Download because it relies on Electron's save dialog.

Open a remote workspace in VS Code, Cursor, or Zed

For SSH worktrees, the worktree menu's Open in list can hand the remote path to an editor that opens SSH hosts itself, when your configured app is VS Code, VS Code Insiders, Cursor, or Zed (code / code-insiders / cursor / zed, or a direct path to those launchers).

  1. Configure Settings → General → Open in menu so the editor is listed (preset or custom command).
  2. Right-click the SSH worktree (or use the worktree overflow menu) → Open in → the editor.
  3. Orca launches the editor against that host and the worktree path. The menu entry may show a Remote SSH badge.
    • VS Code and Cursor use Remote-SSH: --remote ssh-remote+<host> <path>. A host on a port other than 22 needs an alias in your local SSH config.
    • Zed uses its SSH URL: zed ssh://[user@]host[:port]/<path>, so custom ports work without an alias. A manual host with an identity file, jump host, or proxy command still needs an alias, because the URL can't carry those.

Not supported for this remote path: other editors, compound shell commands, or opening via a Remote Orca Server active runtime (those stay Local only). Use the Finder/Explorer item only for local paths.

Kerberos / GSSAPI

If a host in OpenSSH config sets GSSAPIAuthentication yes, Orca prefers the system OpenSSH transport for that target (the built-in ssh2 client does not speak GSSAPI). Keep a valid Kerberos ticket (kinit / your org's SSO) before connecting. Manual targets can also enable GSSAPI when configured for system SSH.

You do not flip a separate “Kerberos mode” switch for config-imported hosts — import/ssh -G carries the flag through.

FIDO2 / security keys

Hardware-backed OpenSSH identities (ed25519-sk, ecdsa-sk, including agent-backed security keys) also use system OpenSSH rather than the built-in ssh2 client. Orca detects the key type from your identity files and hands the connection to the OS OpenSSH binary so the touch / PIN prompt works as usual. Regular Ed25519, ECDSA, and RSA keys stay on the built-in transport. If OpenSSH is not available on the machine, those FIDO2 targets cannot authenticate until it is installed and on PATH (or in the usual Windows/macOS/Linux locations).

Managed Orca server

On first connect, Orca sets up its own server on the host — a pinned runtime it ships and keeps up to date — so a connection no longer fails because the host has the wrong Node version or no build tools. There is no setting to turn this on.

If neither your computer nor the host can download the Node.js runtime, the connection error offers Use a Node.js mirror…. Review or replace the prefilled mirror, then choose Save and retry; Orca verifies each download against its pinned checksum. If the configured mirror also fails, open Settings → Advanced → Network to correct the mirror before reconnecting.

  • An empty host is set up and connects to its managed server.
  • A host that already has Orca projects but no open terminals moves its projects, folders, project groups, and open editor tabs onto the managed server on its next connect.
  • Terminals left running by v1.4.224 keep working in their existing tabs through the upgrade and reconnect; new terminals on that host open on the managed server.
  • A host the managed server cannot run on no longer falls back to the old SSH runtime. The connect fails with the reason, and Settings → SSH Hosts shows it — use an older Orca version to keep connecting to that host.

Manage each server under Settings → Orca on your SSH hosts: see its version and running terminals, Update or Roll back, Recover an interrupted update, or Stop… / Forget… it. If terminals are running, Update anyway updates the server without closing them. The CLI mirrors those actions — orca environment status|update|rollback|recover|stop|forget — see the CLI reference.

Runtime choices

The old per-host Runtime selector (Auto / Orca-managed Node / Host Node) and the relay-only lifecycle settings are gone: every SSH connection runs on the managed Orca server. If Orca cannot run the managed server on a host — an unsupported OS or CPU, a noexec home directory, or an SSH server that refuses port forwarding — the connect explains why in Settings → SSH Hosts instead of silently falling back.

Linux hosts needing native build tools

When a Linux host does not match a prebuilt native node-pty binary, Orca compiles it on the host and requires make, a C++ compiler, and python3:

  • Debian/Ubuntu: sudo apt-get install -y build-essential python3
  • Fedora/RHEL: sudo dnf install -y make gcc gcc-c++ python3
  • Alpine: sudo apk add build-base python3
  • Arch: sudo pacman -S --needed base-devel python

Install the tools, then reconnect so Orca can build native modules.

Windows hosts

Orca can use a Windows PC as an SSH host. OpenSSH Server needs Windows 10 build 1809 or later, or Windows Server 2019 or later. If that PC already runs the Orca desktop app, a Remote Orca Server is usually simpler, because it needs no OpenSSH Server setup. To use SSH instead, prepare the PC once. Microsoft's Get started with OpenSSH for Windows covers each step in more detail.

1. Install OpenSSH Server

Install OpenSSH Server from Optional features in Settings (search Settings for "Optional features", because its location varies by Windows version), or run this in PowerShell as an administrator:

Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

2. Start the sshd service

Whichever way you installed it, start the service and make it start with Windows. In PowerShell as an administrator:

Start-Service sshd
Set-Service -Name sshd -StartupType Automatic

If Orca says nothing accepted the connection, the sshd service is usually not running.

3. Check the firewall rule

Installing OpenSSH Server creates and enables an inbound firewall rule named OpenSSH-Server-In-TCP for port 22. Check it:

Get-NetFirewallRule -Name OpenSSH-Server-In-TCP | Select-Object Name, Enabled, Profile
  • If Enabled is False and Profile lists only the network types you want SSH on, turn it on with Enable-NetFirewallRule -Name OpenSSH-Server-In-TCP.

  • If no rule is found, create one that allows SSH only on networks Windows treats as private:

    New-NetFirewallRule -Name OpenSSH-Server-In-TCP -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 -Profile Private

For other setups, such as a different port or network profile, see Microsoft's Windows Firewall overview.

Your laptop still needs a network path to the PC, such as a home network you trust or Tailscale. Don't forward port 22 to the public internet.

4. Sign in

You don't need a separate Windows user. The account you already use can sign in over SSH once one of the methods below works for it. A separate standard account is optional, for example to limit what agents on that PC can reach.

  • User name: run whoami on the PC. It prints computer\name for a local account and domain\name for a domain account. For a local account, use the part after the backslash. For a domain account, use the full domain\name form.
  • Password: password sign-in uses the account's Windows password. If you sign in to Windows with a Microsoft account, that is the Microsoft account password, not your Windows Hello PIN. Some accounts, such as passwordless Microsoft accounts, have no password SSH can use.
  • Key: Microsoft supports key sign-in for local and Active Directory accounts. Where the public key goes depends on the account:
    • Standard account: .ssh\authorized_keys in the profile folder of the account you sign in as, usually C:\Users\<name>\.ssh\authorized_keys.

    • Administrator account: sshd ignores the profile file and reads C:\ProgramData\ssh\administrators_authorized_keys instead. By default every administrator account on the PC shares this one file, so a key added there can sign in as any of them. Only SYSTEM and the Administrators group may have access to that file, each with full control. In PowerShell as an administrator:

      Add-Content -Force -Path "$env:ProgramData\ssh\administrators_authorized_keys" -Value '<your public key>'
      icacls.exe "$env:ProgramData\ssh\administrators_authorized_keys" /inheritance:r /grant "*S-1-5-32-544:F" /grant "*S-1-5-18:F"

      /inheritance:r removes inherited entries but keeps entries set directly on the file. Run icacls.exe "$env:ProgramData\ssh\administrators_authorized_keys" afterwards and remove any entry other than SYSTEM and Administrators.

Windows OpenSSH does not support signing in with a Microsoft Entra ID account, by password or by key. Use a local or Active Directory account on that PC instead.

Microsoft's key-based authentication guide has more detail.

5. Tools and file transfer

Install Git and the agent CLIs you use on the PC, and sign in to them there. Orca installs its own server over SSH on first connect. Keep the default Subsystem sftp sftp-server.exe line in C:\ProgramData\ssh\sshd_config: without SFTP, Orca can only write files reliably when PowerShell 7 is installed on the PC.

Port forwarding

For remote worktrees, the right sidebar shows a Ports tab (toggle with Cmd+Shift+I). Orca scans the workspace's own host — the managed SSH server or paired server the worktree runs on, not your laptop — and lists listening ports under Detected; one click forwards them to you, and you can stop a detected port from the same panel. You can also add forwards manually, edit them, or remove them. Saved forwards return on managed hosts after a reconnect, persist across app restarts, and privileged remote ports auto-remap locally (e.g. remote 80 → local 10080). If a saved forward cannot start, its row explains why and lets you remove it. On managed SSH hosts, select Forward on a detected port to open the forwarding dialog. On shared Linux hosts, the detected list excludes ports owned by other login users; root and system-service ports remain visible.

macOS hosts: local network access

On macOS 15 and later, a terminal on an SSH host can lose access to devices on the host's local network (for example kubectl, Homebrew node or python, or .local names fail with no route to host). macOS credits network access to the SSH session that started Orca's server on the host, and when that session ends, programs started from the server's terminals are blocked. Apple's own tools such as /usr/bin/curl keep working, and loopback connections are unaffected. Full Disk Access granted through Allow full disk access for remote users may stop working the same way.

When Orca sees that this happened, the host's status in Settings → SSH says so and offers Restart Orca’s server…, which starts the server again from your current connection. Orca restarts it only when no terminals are running on the host, because terminals that are still open keep the lost access. Close them first.

To avoid the problem altogether, an administrator on the host can exempt local address ranges from the Local Network check (macOS 15.5 and later; see Apple's TN3179). The exemption applies to every app on that Mac for the listed ranges:

sudo defaults write com.apple.network.local-network AllowedEthernetLocalNetworkAddresses -array "10.0.0.0/8" "172.16.0.0/12" "192.168.0.0/16"
sudo defaults write com.apple.network.local-network AllowedWiFiLocalNetworkAddresses -array "10.0.0.0/8" "172.16.0.0/12" "192.168.0.0/16"

Restart the Mac for the change to take effect. To undo it, run sudo defaults delete com.apple.network.local-network AllowedEthernetLocalNetworkAddresses (and the same for the Wi-Fi key), then restart.