Introduction¶
The plugin-oriented architecture of DeepSeek Harness (DSH) allows developers to extend functionality through plugins. Beyond local file handling or single-host SSH operations, managing multiple servers often requires frequent connection switching. The dsh-ssh-remote plugin solves this problem: it supports maintaining multiple SSH connections simultaneously and provides the agent with the ability to directly inspect, edit, and execute remote files.
This is a fork of flymysql/dsh-remote, refactoring the traditional single-connection pool model into a multi-pool parallel connection model.
Maintenance Status and Compatible Versions¶
This project has stopped maintenance as of September 10, 2026.
- Baseline compatible version:
@deepseek-ai/dsh@0.1.2-rc.1 - Unverified versions:
0.1.5-rc.1and later - License: MIT
The code remains usable as-is (still MIT), but it is not guaranteed to work with DSH 0.1.5+ versions.
Installation¶
Installation is recommended in an environment where DSH is already installed. It only requires three steps:
# 1) 克隆本项目
git clone https://github.com/chai1110/dsh-ssh-remote.git
cd dsh-ssh-remote
# 2) 一键安装(自动装依赖 + 注册 symlink + 创建 SSH 增强预设)
bash install.sh
# 3) 重启 DSH
kill $(pgrep -f 'dsh web') 2>/dev/null; dsh web
The installation script automatically performs the following:
1. Installs dependencies (such as ssh2).
2. Creates a symlink in the profile’s node_modules.
3. Enhances the corresponding official user presets (standard, code, minimal, and cordis) with same-name presets, so that SSH tools appear directly in the existing modes.
Features¶
- Multi-server SSH registry: Manage configurations for multiple servers (host, port, user, password, or private key), stored in
~/.dsh/remote-workspaces/machines.json. - Simultaneous connections to multiple hosts: Each machine has an independent connection pool without interfering with others.
- Remote workspaces: Specify a remote directory for each machine; local mirrors are stored in
~/.dsh/remote-workspaces/<host>/.... - Bidirectional SFTP synchronization: Supports
rw_sync(remote → mirror) andrw_push(mirror → remote). - Agent remote operation tools: Provides
rw_*tools for file browsing, read/write, and command execution. - Settings panel: The DSH Web settings page includes a remote workspace management UI, supporting CRUD operations for machines and connection testing.
Tool Usage¶
All tools support the machineId parameter to specify the target machine. If no parameter is provided, the current machine is used by default.
| Tool | Purpose |
|---|---|
rw_info |
View all registered machines, connection status, and the current workspace. |
rw_connect / rw_switch |
Register a new machine or switch the current machine. |
rw_pick_workspace |
Set the remote workspace directory for the specified machine. |
rw_list_dir / rw_read_file |
Browse remote directories and read remote files. |
rw_write_file |
Write directly to a remote file (parent directories are created automatically). |
rw_exec |
Execute Shell commands remotely. |
rw_sync / rw_push |
Synchronize between remote and local mirror. |
rw_disconnect |
Disconnect the specified machine. |
Examples¶
The agent can drive these tools directly through conversation. For example:
- Register and connect to two servers:
rw_connect (host=192.168.1.10, user=root, privateKeyPath=/Users/me/.ssh/id_rsa)
rw_connect (host=192.168.1.20, user=root, password=xxx)
- Set a workspace for the first server:
rw_pick_workspace (machineId=<第一台id>, path=/srv/app)
- Execute commands and view files remotely:
rw_exec (machineId=<第一台id>, command='docker compose ps')
rw_list_dir (machineId=<第一台id>, path=/srv/app)
rw_read_file (machineId=<第一台id>, path=/srv/app/src/main.py)
- Synchronize remote files to local:
rw_sync (machineId=<第一台id>)
Notes¶
- This project was forked from
flymysql/dsh-remote; the underlying SSH engine, SFTP synchronization, and related components come from that upstream project (BSD-3-Clause). - Because maintenance has been paused, if the official DSH version is upgraded to
0.1.5-rc.1or higher, the plugin may not work correctly. - The plugin is mounted via a same-name user preset override mechanism; after upgrading DSH, you usually need to run the installation script again.