dsh-remote
Remote-work assistant for DeepSeek Harness: connect SSH (password or key) to a remote host, pick a remote workspace directory, and operate on it with remote_list_dir / remote_read_file / remote_exec tools from the agent and a settings-page browser.
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:flymysql/dsh-remote说明文档
阅读完整 README ↗dsh-remote
DeepSeek Harness(DSH)的远程工作助手。
连接一台 SSH 主机,选取一个远程工作区目录,让 Agent 在不离开 harness 的情况下直接对它操作——列目录、读文件、跑命令。
DSH Web 界面刻意只监听 127.0.0.1(--host 0.0.0.0 被安全地拒绝)。这个插件的思路相反:由你主动向外连到远程主机,在远程目录里工作。
能力
- 连接远程:支持密码或 SSH key(基于
ssh2)。 - 选取远程工作区:把远程某个目录当作本会话的项目根。
- 模型工具:
rw_info、rw_connect、rw_pick_workspace、rw_list_dir、rw_read_file、rw_exec。 - 设置 → 远程工作区:输入主机与登录方式→连接→浏览远程文件系统→设为工作区。
- 当前远程工作区(
user@host:/path)会注入每次系统提示,让 Agent 明确知道工作根目录。
安装
dsh plugin --profile web add dsh-remote
(bundle 安装;行内容是 id: dsh-remote、name: dsh-remote。)
使用
1. 可选:在配置里设默认主机
cordis.patch.yml:
- id: dsh-remote
name: dsh-remote
config:
host: 10.0.0.8
port: 22
username: dev
privateKeyPath: C:/Users/you/.ssh/id_rsa
# 或用密码登录:
# password: '…'
workspace: /home/dev/project
若 host 为空,插件启动时处于断开状态,可在运行时连接。
2. 连接并选工作区
- UI:设置 → 远程工作区 → 填 host/port/user +(密码或 key 路径)→ 连接远程 → 输入远程路径并按 设为远程工作区(或用 列目录 浏览)。
- 让 Agent 做:
rw_connect(host)之后rw_pick_workspace(path=/…/project);随时可用/remote看状态。
3. 在远程工作区里工作
Agent 使用:
rw_list_dir(path?)
rw_read_file(path=…)
rw_exec(command=…)
由于工作区路径在系统提示里,Agent 会把它当作工作根,组合这些工具对远程项目做查看/构建/测试。
配置
| 键 | 类型 | 默认 | 说明 |
|---|---|---|---|