One of the core design principles of DSH (DeepSeek Harness) is a plugin-based architecture. When developers need to work on a remote server while keeping the local session, Web GUI, and $DSH_HOME unchanged, traditional SSH toolchains often cannot meet this “local control, remote execution” integration requirement.

dsh-remote-ssh is designed to solve this problem. It is a DSH plugin that allows you to offload workspace file I/O and command execution to an SSH target host, while keeping session management, the Web GUI, and local configuration running on the current machine.

Core Capabilities

The plugin provides the following features:

  • SSH Connection Manager: Add, test, or remove connections in the Web GUI. Supports passwords, private keys, SSH Agent, and ProxyJump chained jumps.
  • Remote Directory Browser: Browse the directory tree of a target host in the GUI, and adopt any directory as a workspace.
  • Session-based Routing: A session’s working directory determines the host on which it runs. ssh://<id>/<path> is equivalent to its local placeholder, allowing multiple remote hosts to run in parallel.
  • Remote Filesystem and Subprocess (Full Mode): In the runtime context, ctx.fs and ctx.subprocess point to the remote host. Git operations, tests, builds, and file read/write are all executed remotely.
  • Smart Agent Bootstrapping: Built-in agent bootstrapping; runtime sessions declare in the context which machine the session is currently running on. Provides interfaces such as ssh_exec / ssh_route_status and DSH_SSH_* environment variables to avoid path misjudgment or “empty project mirrors.”
  • Credential Localization: Passwords and identity keys are stored only in the DSH Home of the local machine.

Installation and Enabling

Environment Requirements

  • Local environment: Node.js >= 22.0.0
  • Target host: python3 and bash installed

Installation Command

Note: Do not run dsh plugin add dsh-remote-ssh directly. That name resolves to a different author, not this plugin.

Please use the following command to install from the GitHub repository:

dsh plugin --profile web add github:aijunjiang/dsh-remote-ssh

First-Time Installation Notes (pnpm 11)

ssh2 and cpu-features are native modules, and pnpm 11 blocks their build scripts by default. You may encounter build errors during the initial installation.

  1. Enter the Web configuration directory:
    cd ~/.dsh/profiles/web
  1. Edit pnpm-workspace.yaml and add the following under allowBuilds:
    allowBuilds:
      cpu-features: true
      ssh2: true
  1. Run pnpm install to rebuild:
    pnpm install
  1. Re-run the installation command to complete registration.

Usage

  1. Add a Remote Connection: Open the “Workspace” panel in the Web GUI sidebar and click “Add Workspace”. In the directory selector, click the “+” button and fill in the target host information (host/alias, port, user, authentication method, ProxyJump, etc.).
  2. Browse and Adopt: After saving the connection, the GUI will directly display the remote directory tree. Choose a directory and open it to set it as the current workspace.
  3. Start a Session: Start a session within the workspace. The session will be routed to that remote host, and files and commands will be executed remotely.
  4. Runtime Interfaces: In the session’s runtime context, you can directly use ssh_exec or ssh_route_status to interact with the remote host.
  5. Launch the GUI: Use pnpm dsh web to launch the Web user interface provided by the plugin.

Additional Notes

  • UI Enhancement Patches: The plugin directory includes harness-patches/, a set of optional UI enhancement patches (such as the workspace title suffix home · root@… and the Stop button in the task list). These patches are applied to the harness source with git apply. They do not affect core routing functionality, but depend on compatibility with the DSH baseline version.
  • Compatibility: The current version (v0.3.3) requires DSH baseline version 0.1.5-rc.1.

Summary

dsh-remote-ssh addresses the problems of overly long remote development paths and dispersed credential management in the DeepSeek Harness environment. It transports the execution context to a remote host via the SSH protocol while preserving the convenience of the local development toolchain. It is well suited for scenarios that require running CI/CD, tests, or build tasks on remote servers.