Preface¶
The extension method of DSH emphasizes “everything is a plugin.” In scenarios where the Agent needs to directly handle remote server files, the common practice is to first execute SSH commands in the local terminal and then manually check the results; if there are multiple servers, one also has to switch back and forth between multiple connections and multiple working directories.
cslht11/dsh-ssh-remote is a DSH plugin designed for this scenario: managing multiple servers, maintaining multiple SSH connections simultaneously, and selecting remote workspaces on each machine, allowing the Agent to view, edit, and execute remote files via rw_* tools.
This article is based solely on verified information. The related community directory page is an independent site and is not officially affiliated with DeepSeek or Huanfang.
What is this¶
cslht11/dsh-ssh-remote is an SSH remote workspace plugin for DeepSeek Harness (DSH), a multi-machine parallel version. Maintained by cslht11, licensed under MIT.
This project is a fork and modification of flymysql/dsh-remote and is not entirely original. The upstream version is 0.5.10, and the version of this repository is 0.6.0.
The plugin adapts to @deepseek-ai/dsh@0.1.1-rc.2 and enhances existing modes standard, code, minimal, and cordis so that these modes can use remote workspace tools directly.
Core Features¶
Multi-machine Registration and Parallel Connections¶
- Multi-machine SSH registry: Supports an arbitrary number of servers, configuring
host/port/user, as well as passwords or private key + passphrase; the registry is saved in~/.dsh/remote-workspaces/machines.json. - Connecting to multiple machines simultaneously: Independent connection pools for each machine, without interfering with each other.
- Switching current machine:
rw_switchis used to switch the current machine, andrw_disconnectis used to disconnect a specified machine.
Remote Workspaces and Synchronization¶
- Remote workspace: Select a remote directory for each machine; the local mirror is located at
~/.dsh/remote-workspaces/<host>/.... - Bidirectional SFTP synchronization:
rw_sync: Remote -> Local mirrorrw_push: Local mirror -> Remote
Agent Tools¶
All rw_* tools support machineId to specify the target machine; if machineId is not passed, the current machine is used.
| Tool | Action |
|---|---|
rw_info |
View registered machines, connection status, and current workspace |
rw_connect |
Register / connect a machine |
rw_switch |
Switch current machine |
rw_pick_workspace |
Set remote workspace directory for a specified machine |
rw_list_dir |
Browse remote directory |
rw_read_file |
Read remote file |
rw_write_file |
Write remote file |
rw_exec |
Execute shell command remotely |
rw_sync |
Remote -> Local mirror sync |
rw_push |
Local mirror -> Remote sync |
rw_disconnect |
Disconnect specified machine |
Settings Panel¶
In DSH Web, machines can be managed via Settings → Remote Workspaces, supporting CRUD operations for multiple machines, testing connections, and switching the current machine.
Installation and Activation¶
The following is the one-click installation command. The installation script will automatically install dependencies, register symlinks, and copy/append user presets for standard, code, minimal, and cordis.
git clone https://github.com/cslht11/dsh-ssh-remote.git
cd dsh-ssh-remote
bash install.sh
kill $(pgrep -f 'dsh web') 2>/dev/null; dsh web
After the above steps, open DSH Web, create a new session, and select the standard, code, minimal, or cordis mode. These modes already have rw_* tools built-in, so there is no need to switch to an extra mode.
The installation script will create a symlink for ~/.dsh/profiles/web/node_modules/dsh-ssh-remote and copy/append user presets for each mode.
Uninstallation is recommended to be performed via:
bash install.sh --uninstall
When uninstalling manually, you need to delete the symlink and remove the SSH plugin lines from agent.cordis.yml of each mode.
Typical Usage¶
Conversational Way: Registering Two Machines¶
In a DSH session, you can let the model call tools with the following content:
rw_connect 添加 192.168.1.10(root,密钥 /Users/me/.ssh/id_rsa)
rw_connect 添加 192.168.1.20(root,密码 xxx)
Conversational Way: Selecting Workspace and Executing Commands¶
rw_pick_workspace (machineId=<第一台id>, path=/srv/app)
rw_exec (machineId=<第一台id>, command='docker compose ps')
Conversational Way: Viewing, Reading, Writing, and Synchronizing¶
rw_list_dir (machineId=<第一台id>, path=/srv/app)
rw_read_file (machineId=<第一台id>, path=/srv/app/src/main.py)
rw_write_file (machineId=<第一台id>, path=/srv/app/config.yml, content='...')
rw_sync (machineId=<第一台id>)
rw_sync will mirror the remote workspace to the local ~/.dsh/remote-workspaces/; if you want to write the local mirror back to the remote, use rw_push.
Settings Panel Way¶
Open DSH Web and go to:
Settings → 远程工作区
Here you can add, delete, modify machines, test connections, and switch the current machine.
Applicable Scenarios and Notes¶
Suitable users include:
- People who need to directly view, edit, and execute remote server files in a DSH session.
- People who need to maintain multiple server SSH connections simultaneously.
- People who want to add remote workspace tools to existing modes
standard,code,minimal, andcordis.
Notes before use:
- This plugin adapts to
@deepseek-ai/dsh@0.1.1-rc.2. When changing the DSH version, it should be reinstalled or adapted based on the version mechanism. - The plugin runs with the permissions of the current
dshprocess and involves SSH credentials, remote file reading/writing, remote command execution, and SFTP synchronization; the source code, dependencies, and license should be checked before installation. - This project is a modification of
flymysql/dsh-remote, and the main repository license isMIT. The repository contains vendored components@deepseek-ai/dsh-client-ui-aionui-paneland@deepseek-ai/dsh-ssh, both underBSD-3-Clause; among them, the panel design ofdsh-aionui-panelis a reimplementation based oniOfficeAI/AionUi(Apache-2.0). - The machine registry is saved in
~/.dsh/remote-workspaces/machines.json, maintained independently for each device.
Links¶
- Directory Page:
https://www.skillhub.cn/plugins/cslht11/dsh-ssh-remote - GitHub:
https://github.com/cslht11/dsh-ssh-remote