The plugin-based ecosystem of DSH allows users to extend functionality according to their needs. Beyond local development, directly operating remote machines usually requires manually configuring SSH connections and managing Worktrees, and local tools cannot directly act on remote file systems. The dsh-remote-workspace plugin solves this problem by taking over Harness’s file, Shell, and terminal tools, routing them to remote directories, and providing a terminal management entry point in the sidebar.

Plugin Introduction

Plugin name: @lengmoxxl/dsh-remote-workspace
Maintainer: lengmoXXL
Open-source license: MIT

This plugin connects to remote machines over the SSH protocol and runs a self-installing agent on the target machine. It not only manages remote repositories and worktrees, but also allows you to operate remote projects from the Harness interface as if they were local projects, including running commands, reading and writing files, and opening terminals.

Core Features

The plugin provides the following capabilities:

  1. SSH connection management: Add machines using an SSH target address and token, without manually installing software on the target machine. The agent automatically downloads, verifies, and updates itself.
  2. Repository and worktree management: Register any directory as a repository (Git is not required), and create, switch, or delete worktrees.
  3. Tool routing: Route Harness’s filesystem (ctx.fs), subprocess (ctx.subprocess), Shell (ctx.shell), and terminal (ctx.tty) tools to the remote machine.
  4. Sidebar terminal: Add terminal tabs to the right sidebar, and support listing or reconnecting to Shells that are already running on the remote machine.
  5. PTC program execution: Support running PTC programs (run_code) on the remote machine. The programs run through a V8 engine provided by the plugin and do not depend on the target machine’s Node.js environment.
  6. Network restrictions: Outbound network access is limited to downloading from GitHub Releases and making SSH connections.

Installation and Enablement

Before installing, make sure your environment meets the requirements: Node.js version 22.19+ or 24+, and DSH version 0.1.6-alpha.2 (compatible with 0.1.7-rc.1 and 0.1.7-rc.2).

1. Install the plugin

Use the following command to install the plugin:

dsh plugin --profile web add @lengmoxxl/dsh-remote-workspace

2. Configure compatibility

After installation, the plugin needs to take over the service providers in the base configuration file. You need to modify the configuration file $DSH_HOME/profiles/web/cordis.patch.yml and disable the following four default providers:

- id: subprocess
  disabled: true
- id: fs-sandbox
  disabled: true
- id: bash-sandbox
  disabled: true
- id: pwsh-sandbox
  disabled: true

After disabling these providers, start the Profile with dsh --profile web. At this point, the plugin takes over the routing logic for files, Shell, and terminal.

Typical Usage

1. Add a remote machine

Go to Settings → Remote workspaces. To add a machine, provide an SSH target address and a token (any string, used as the daemon’s shared secret).

2. Manage repositories and worktrees

After registering a repository, right-click it in the list. You can use the menu to open, close, or remove a worktree.

3. Manage terminals

  • View and connect: In the terminal button in the right sidebar, you can list all active Shells in the current Session, including Shells that became disconnected after a page refresh.
  • Create a new Shell: Click the terminal button to create a new Shell, or use “Manage terminals” in the status bar to open a second tab, where you can quickly select and open a new Shell.
  • End a Shell: Only by clicking the close control in the “Manage terminals” panel can a Shell process actually be terminated; closing the tab only hides it or marks it as detached.

Use Cases and Notes

This plugin adopts a high-privilege design. It runs commands, opens terminals, and reads and writes files as the SSH account of the registered machine. This means anyone who has the machine token and can access the loopback port (127.0.0.1) can impersonate that account.

Environment dependencies:
* Operating system: The plugin agent and PTC host currently support only x86_64 Linux and macOS.
* Network: The target machine must allow SSH port forwarding (-L), and access is limited to GitHub Releases and SSH connections only.

Security notes:
Because the plugin disables the default sandbox providers (subprocess, fs-sandbox, bash-sandbox, pwsh-sandbox), be sure to inspect the source code and license before installation to confirm its security.

Summary

dsh-remote-workspace provides DSH users with a unified entry point for remote development. By means of an SSH agent and tool routing, it extends the local development experience to remote machines, making it suitable for scenarios that require centralized management of multiple servers or distributed development.