Foreword

DeepSeek Harness (DSH) binds the Web UI to 127.0.0.1 by default, and the CLI also rejects --host 0.0.0.0. This is a deliberate security design. In real development, code and build environments are often on another machine: a cloud host, an internal server, or a Windows development machine. Common practices include manually syncing files via SSH or running another set of editors locally, making it impossible for agents to directly manipulate remote directories.

Below is an introduction to dsh-remote (flymysql/dsh-remote), a DSH networking tool plugin maintained by the community member flymysql. It allows your local DSH to actively connect out to an SSH host and remote directory. Through rw_* tools, you can read, write, and execute commands on the remote, while mirroring the directory to a local real workspace using DSH’s native workspace and agent file streams, without altering dsh-workspace or the harness core.

What Is This

dsh-remote is a remote workspace assistant plugin for DeepSeek Harness, categorized as a networking tool. One-line positioning: manage multiple SSH hosts, select a remote (or local) workspace, let agents operate directly on remote directories, and use SFTP to mirror remote directories into local DSH workspaces.

Multi-Host SSH and Workspace Selection

Multi-Host Registration and Connection

The Settings panel provides a “Remote Workspace” entry to save any number of SSH hosts (host / port / user, with private key or password). Passwords are stored locally only; the UI does not echo them. Each machine can be individually configured with:

  • passphrase, host-key mode, SSH agent
  • keyboard-interactive (OTP)
  • proxy jump (bastion)
  • optional OS keychain encryption for password storage (macOS Keychain / Windows DPAPI / Linux secret-tool)

Supports importing Host aliases from ~/.ssh/config (only references paths, does not read key content). Before saving, a “Test Connection” can verify authentication, network, host key, and timeout categories for error prompts.

Dual-Tab Workspace Selector

The plugin populates DSH’s native “Add Workspace / Select Workspace” flow, displaying a centered modal with two tabs:

Local — Calls the system folder picker (macOS osascript, Linux zenitykdialog, Windows FolderBrowserDialog), or allows direct input of a local path as a standard DSH local workspace.

Remote — First select a machine, then the path box pre-fills with / and provides real-time directory completion (selecting a level immediately lists the next, similar to OS/VSCode experience). The “Browse…” overlay shows size and mtime, prioritizes directories, follows symlinks, fills the path but does not submit immediately. After confirmation, click “Set as Remote Workspace”. Also offers recent workspaces, ~ home shortcuts, and “New Directory”.

After confirming a remote workspace, the plugin creates a real mirrored directory locally:

$DSH_HOME/remote-workspaces/<host>-<user>-<port>/<base>

After fs.realpath, it is adopted by the harness as the official workspace, and dsh-remote keeps it synchronized via SFTP.

Core Capabilities

Bidirectional SFTP Synchronization

rw_sync (remote → mirror) and rw_push (mirror → remote) use three-way comparison (remote, local, last sync snapshot). Files modified on both sides report conflicts and are not silently overwritten; force=true can force an overwrite. Both support dry-run, background tasks, and follow gitignore-style ignore rules (.dsh-remote-ignore under remote-workspaces, defaulting to ignore .git, node_modules, target, dist, build, etc.).

20 rw_* Model Tools

All based on SFTP, usable on both Windows and POSIX remotes:

Tool Function
rw_info View current connection and workspace info
rw_connect Establish SSH connection (with save to store config)
rw_pick_workspace Select remote workspace
rw_list_dir List directory (with size, mtime)
rw_stat File metadata
rw_read_file Read file (supports utf-8 / gbk encoding)
rw_write_file Write file
rw_edit Literal replacement edit with mtime optimistic lock
rw_append Append content
rw_mkdir Create directory
rw_remove Delete (recursive, bounded)
rw_move Move/rename
rw_exec Execute command remotely (supports pty / env)
rw_search SFTP tree traversal search (with context lines, respects ignore rules)
rw_download / rw_upload Stream transfer (fastGet/fastPut, with size limits)
rw_forward SSH port forwarding
rw_sync / rw_push Sync and push
rw_disconnect Disconnect

When rw_sync / rw_push is set with async: true, it returns a taskId, queryable via /dsh-remote/task for progress, result, or cancellation (single-flight queue).

Port Forwarding

The Settings page or rw_forward can create, start, stop, and delete local forwards (127.0.0.1:port → remote) and reverse forwards (remote → local). Definitions are persistent, automatically restart on reconnection, and all stop when disconnected.

Since v0.7.2, dsh-better-sidebar is a hard dependency and automatically mounts. The sidebar remote file tab supports clicking “Edit” → modify → “Save to Remote” with mtime optimistic lock (concurrent modifications return 409, prompting “Re-read”). The explorer row shows file size, and the right-click menu supports downloading to local mirror, renaming, deleting, and creating directories.

Security and Auditing

  • Host-key verification (TOFU): Default is hostKeyMode: accept-new, which records the host key on first connection and rejects subsequent changes (prevents MITM). verify rejects hosts never seen before; off disables verification. Records are stored in $DSH_HOME/remote-workspaces/known_hosts.json and can be reset via /remote forget-key.
  • Command audit log: Every rw_exec, write, delete, move, and forward operation appends to $DSH_HOME/remote-workspaces/audit.log (timestamp · user@host · operation · exit code · command); Settings display the last 30 entries.
  • Currently active user@host:/path and active forwards are injected into the system prompt.

Cross-Platform and Data Locations

All file access occurs at the SFTP protocol layer, independent of the remote shell, so behavior for listing directories, reading/writing, searching, and syncing is consistent across Linux, macOS, and Windows remotes. Machine configurations and mirror directories are under $DSH_HOME; data from before 0.6 is in ~/.dsh/remote-workspaces, automatically migrated on first run.

Installation and Enabling

The community directory and README provide the same installation command:

dsh plugin add dsh-remote

One command installs the complete bundle. Since v0.7.2, the sidebar component dsh-better-sidebar mounts with the package, requiring no extra steps; if the sidebar is already installed separately, the embedded copy automatically defers and does not duplicate the mount (from v0.8.7+ order is irrelevant, but earlier versions with an independent sidebar after dsh-remote might cause startup failure due to duplicate /sidebar/api routing).

Environment Requirement: The profile’s pnpm linker must be hoisted (DSH profile default, i.e., nodeLinker: hoisted in pnpm-workspace.yaml).

Typical Usage

1. Add Plugin and Configure Host

dsh plugin add dsh-remote

After starting DSH, open Settings → “Remote Workspace”, add an SSH host (key or password), click “Test Connection” to confirm reachability, and set as current machine.

2. Select Remote Workspace

In DSH’s native “Add Workspace” flow, switch to the “Remote” tab: select machine → browse or input remote path → “Set as Remote Workspace”. After local mirror creation, the workspace is adopted by the harness.

3. Let Agent Operate Remotely

After connection, the agent can read/write files and execute build commands remotely via rw_* tools. For example, sync remote changes to local mirror:

rw_sync

Push local mirror back to remote (check conflict report first, use force=true if needed):

rw_push

To access remote internal services, configure rw_forward local port forwarding in Settings or via tools.

4. Sidebar Direct Editing

Open files in better-sidebar’s remote file tab, edit and “Save to Remote”; if the remote has been modified by others, follow the prompt to re-read before saving.

Applicable Scenarios and Notes

Who It’s For

  • Developers who drive agents in DSH but have code, builds, and test environments on remote SSH hosts
  • Scenarios requiring management of multiple machines (cloud servers, internal hosts behind bastion hosts, Windows remote desktop alternatives)
  • Users wanting to browse, edit, execute commands, and sync directories remotely in a single harness interface without altering the harness core

Pre-Use Notes

  1. Permission Boundary: The plugin runs with the current DSH process permissions, able to read/write your configured SSH credentials, local mirror directories, and execute remote commands. Before installation, review the source code and MIT license to confirm alignment with your security policy.
  2. Passwords and Keys: Passwords are stored locally (optional OS keychain encryption), and private key paths are specified by you; the plugin does not read key content from ~/.ssh/config but uses the path you provide for connections.
  3. Sync Conflicts: By default, does not silently overwrite modifications on both sides; before pushing, check the rw_sync / rw_push conflict report.
  4. Sidebar Version: If upgrading from ≤0.8.6 with dsh-better-sidebar separately installed, v0.8.7+ fixes the duplicate routing issue caused by bundle order; alternatively, remove the independent sidebar and use the embedded copy.

Conclusion

dsh-remote encapsulates “outbound SSH + remote workspace + local mirror” into the DSH plugin model: without altering the harness core, it uses SFTP for unified cross-platform file access, three-way sync to avoid silent overwrites, and audit logs with host-key TOFU to add basic traceability and security verification. If your development environment is remote, it’s worth adding to your DSH networking tool list.