Grants DeepSeek Harness Web conversations access to SSH commands and opt-in SFTP operations, with an encrypted local credential vault.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-ssh-broker
# from a prebuilt release tarball
dsh plugin --profile web add -w "https://github.com/wzxyisme/dsh-ssh-broker/releases/download/v0.7.3/dsh-ssh-broker-0.7.3.tgz"
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:wzxyisme/dsh-ssh-broker#path:/bundle
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
项目首页(简体中文) · English README · 安装包
在本机 Harness 的「设置 → SSH 设备」创建或解锁凭据库。每台设备保存各自的凭据和权限,可单独变更或删除。
核对主机指纹
在目标服务器的可信控制台(如云厂商控制台)执行下面的命令。设置页也提供「复制命令」。
ssh-keygen -E sha256 -lf /etc/ssh/ssh_host_ed25519_key.pub
将输出中以 SHA256: 开头的字段填入设置页。若 SSH 服务使用其他主机密钥,换成对应的 .pub 文件。不要把未经可信渠道核对的网络扫描结果当作可信指纹。
授权时限
选择设备、活跃的 Harness 会话和权限范围。默认「限时有效」为 300 秒,可设为 1 至 900 秒。长任务可选「本次会话有效」,核对设备、会话和操作范围后再次确认。只要这类授权仍生效,凭据库就不会因空闲上锁;最后一条结束后,恢复十分钟空闲上锁。关闭浏览器标签页不一定关闭 Harness 会话。
会话关闭、Harness 退出或重启、撤销、库上锁或插件停用都会结束授权并关闭相应的活动连接。轮换或更新连接端点只撤销受影响设备的授权。
在输入框提交 SSH 任务
在会话的空输入框点击「+」,从「指令」中选择 /ssh-broker,也可以直接键入 /ssh-broker。填写任务后发送。当前会话只有一台设备获授权时,默认自动选择。多台设备获授权时,在输入框上方明确选择一台。发送时插件会复核授权,并把对应工具和授权 ID 随任务传给该会话。授权已失效时,先到设置页为会话重新授权。
0.4.0 将 ssh_exec、ssh_upload、ssh_download 分别更名为 dsh_ssh_broker_exec、dsh_ssh_broker_upload、dsh_ssh_broker_download。请更新写有旧工具名的提示词或脚本。
助手文件传输
每次创建授权时默认为「仅 Shell」,文件传输关闭。先选设备和会话,再选「仅文件传输」或「Shell 和文件传输」,填写一个已存在的远端绝对目录,最后确认授权。默认只允许传输授权根目录的直属文件。勾选「包含子目录」后,即可列出子目录并传输其中的文件。如果需要更改范围,先撤销该设备的当前授权,再重新授权。
- 在设置的授权列表点击「预览目录」,可以查看授权根目录下一层的普通文件和子目录。预览结果只显示在设置页。也可让助手通过
dsh_ssh_broker_list按需列出一层目录。每次最多返回 100 项,达到读取上限时标记为不完整。 - 上传附件时,把文件作为同一条任务的附件,写明附件名和远端文件名。不同内容用了同一个附件名时,请改名后重新上传附件。下载返回当前会话的 DSH 文件附件。
- 上传工作区文件时,例如发送
/ssh-broker 将 @docs/report.md 上传为 report.md。带空格的路径可写@"docs/my report.md"。路径相对于会话创建时记录的工作区,不随cd改变。每次都要在 DSH 审批中核对本地文件、设备和远端完整路径;拒绝、撤销或审批不可用时不会上传。此功能需要 Linux 上可访问本机工作区的 DSH 文件系统和/proc/self/fd。只接受单个普通文件,拒绝绝对路径、..、符号链接与多重硬链接;文件在审批后发生变化时需重新发起。没有可用工作区或审批渠道时,可改用会话附件。 - 开启子目录权限后,可以用相对于授权根目录的路径,例如
reports/summary.txt。SFTP 工具拒绝绝对路径、..和符号链接。每次处理一个普通文件,最多 8 MiB。上传和替换的单次审批最多等待 120 秒,批准后有独立的 60 秒操作预算;审批前的检查及无需审批的文件操作仍以 60 秒为限。授权过期、撤销或会话关闭仍会中止操作,时间预算不会延长授权。普通上传需要 OpenSSHhardlink@openssh.com,始终拒绝覆盖同名文件。 - 上传返回最后到达的阶段
phase,以及远端确认写入临时文件的字节数acknowledgedBytes。它们用于区分审批、读源文件、连接、远端准备、写入、发布和清理;确认写入不等于已发布。bytes只在已确认发布时给出。approval_timed_out表示等待审批超时;upload_commit_unknown表示无法确认是否发布,应先核对正式目标(工作区文件可用verify),不要直接重试。uploaded_cleanup_pending表示正式文件已发布,但未确认临时文件是否清理。 - 只读校验:例如发送
/ssh-broker 校验 @docs/report.md 与远端 reports/report.md 是否一致。dsh_ssh_broker_verify在 Host 内计算两边的 SHA-256,返回摘要、字节数和matched、mismatched或remote_not_found。它不修改文件、不生成附件,也不需要 Shell。远端内容仍需经 SFTP 读取,工作区要求与工作区上传相同。仅在你明确要求时使用。 - 同名替换:明确要求覆盖时,例如发送
/ssh-broker 用 @docs/report.md 覆盖远端 reports/report.md。dsh_ssh_broker_replace也接受会话附件,两种来源都需一次单独审批。审批显示设备、完整目标路径、来源和旧文件 SHA-256;提交前重新检查旧摘要和属性,发现变化则拒绝。目标必须是现有普通文件,且服务端须支持 OpenSSHposix-rename@openssh.com;不支持时不会退回到先删除再上传。 - 替换会换掉路径所指向的文件,不会更改旧文件的其他硬链接。要求新旧文件属主和组一致,保留普通
rwx权限位,拒绝带特殊权限位的目标;不保证保留 ACL、扩展属性或时间戳。SFTP 没有按旧摘要比较并交换的原子操作,最后一次检查与重命名之间仍可能有并发修改,请勿用于多方同时写入的目录。 - 断线、超时或撤销可能留下
.dsh-sftp-临时文件。若替换返回replace_commit_unknown,先核对正式目标(可用只读校验)和残留,不要直接重试。已确认成功的替换不会因随后撤销而回滚。 - 目录检查仅约束 SFTP 工具,依赖可信目标机和稳定的目录。请使用独立低权限 SSH 账号,以及其他不受信任用户无法修改的目录及父目录。需要远端强隔离时,由目标机通过权限或 SFTP chroot 强制执行。组合授权中的 Shell 可使用 SSH 账号已有的全部权限。
命令以目标 SSH 账号的现有权限执行。workdir 省略或为空时使用 SSH 默认目录,非空时必须是远端绝对路径;格式不合法返回 invalid_workdir,合法绝对路径无法进入时保留远端的退出码 125 和 stderr。调用上限 30 秒,无 PTY,stdin 为 EOF,stdout 和 stderr 各保留最多 8 KiB。超时返回 timed_out,并附带超时前已收到的输出和相应截断标记。此时输出可能不完整,远端操作可能已经产生影响,重试前请先核对结果。断开连接后,脱离 SSH 会话的进程可能继续运行。命令及其输出可能保存在会话记录中,请避免在命令中包含秘密。
凭据和设备资料保存在当前 Profile 的加密库。重启或热重载会使库上锁;没有会话有效期授权时,连续十分钟无使用也会自动上锁。加密防护依赖口令强度。凭据库解锁期间,安全性依赖可信的宿主及同用户进程。进程强制退出后,库的 .lock 文件可能保留。确认所有使用该库的 Harness 进程已退出后,才可移走对应的 .lock 文件并重新解锁。
升级旧版时,先关闭所有仍在使用旧插件的 Harness 实例,然后在新版设置页显式迁移。迁移核验旧凭据的设备绑定,验证加密提交后清理旧记录。发生清理错误时按页面提示重试。旧备份可能仍含明文,已有真实凭据应在目标端轮换。
通过「下载加密备份」用独立强口令导出。创建并解锁一个空库后导入,恢复会自动上锁。重新解锁后,逐台核对指纹并保存,再创建新授权。请单独保管备份和对应口令。迁移 Profile 前请从此页面导出,普通 DSH 配置备份不应作为 SSH 凭据库的恢复来源。旧版明文记录也可能留在历史备份或配置管理器的本机镜像中,迁移不会清除这些副本。
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-remote-web-ui★ 10645
Remote control of a dsh web workspace from phone or PC: QR-code pairing through a token-gated channel, SSE real-time sync, and separate mobile and full desktop GUI modes.
zhu1090093659/dsh-web#packages/dsh-ssh★ 10645
SSH ops panel for DSH: web terminal, SFTP transfer with progress, local port forwarding, and one-command cluster execution across hosts; agents share the same host config.
liguobao/ds-harness-remote★ 3780
Multi-device remote access for DeepSeek Harness and supported coding workspaces through an end-to-end encrypted channel, with adaptive Relay/WebRTC transport, device authorization, workspace files, read-only previews, terminals, and optional Codex Remote.
saya-ch/dsh-mobile★ 1006
Access DeepSeek Harness from the Android app or a mobile browser with secure LAN and remote connections, persistent device pairing, and a customizable mobile interface.
uumit-ai/dsh-uumit-remote★ 531
Open dsh web from your phone or another computer through a UUMit account, without running your own server or installing another program: a built-in tunnel client connects to UUMit's hosted tunnel, and a panel in the sidebar handles pairing and who can use it (only you, people you invite by link or phone number, or everyone), with revocation. Requires dsh web on DSH >=0.2.1-rc.2.
ZSeven-W/dsh-ios★ 485
A live iOS Simulator or USB-connected iPhone inside the conversation: 22 agent tools for booting, building, driving the UI by accessibility identity or OCR text, list-row actions and SwiftUI preview hot reload, plus a streaming sidebar panel you can tap and drag on.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.