dsh-ssh-panel
A small SSH host panel for DeepSeek Harness (DSH): add hosts in Settings (key or password), see the list, and let the agent use them through ssh_list / ssh_exec.
中文 · English
English
DSH plugin with two halves:
- Settings → SSH 主机: a panel to add, edit, test and delete SSH hosts. Key or password auth, per-host port/user/note. Secrets stay on the host.
- Agent tools:
ssh_listreturns the configured hosts (alias, address, user, auth type);ssh_execruns one command on a host by alias and returns stdout/stderr/exit code.
The panel also carries a Restart DSH button that exits the host process and lets systemd's Restart=always bring it back (about three seconds).
Storage is $DSH_HOME/ssh-hosts.json (0600). Passwords and key passphrases never leave the host process: the JSON API returns only hasPassword / hasPassphrase. No telemetry.
Install
# GitHub
dsh plugin --profile web add github:MARYCOMPLEX/dsh-ssh-panel
# or a local tarball
pnpm pack
dsh plugin --profile web add ./dsh-ssh-panel-0.1.1.tgz
Then restart dsh web once. ssh2 builds an optional native crypto binding; pnpm 12 blocks build scripts by default, so if the install reports ERR_PNPM_IGNORED_BUILDS, add this to $DSH_HOME/profiles/web/pnpm-workspace.yaml and re-run:
allowBuilds:
ssh2: true
cpu-features: true
Use
- Settings (gear) → SSH 主机 → 添加主机: alias (
vps), host, port, user, key path or password. - Hit 测试 to verify, then 保存.
- Ask the agent: “去 vps 上看看磁盘” — it calls
ssh_list, findsvps, thenssh_exec.
Tools
| Tool | Arguments | Returns |
|---|---|---|
ssh_list |
— | JSON list of hosts (no secrets) |
ssh_exec |
host, command, optional timeout_ms |
stdout, stderr, exit code; truncated past 256 KiB |
Requirements
- DSH
0.2.1-rc.2(tested),webprofile - Node.js ≥ 22
中文
DSH 插件,两半:
- 设置 → SSH 主机:一个面板,用来添加 / 编辑 / 测试 / 删除 SSH 主机。支持密钥或密码、端口、用户名、备注;密码只留在宿主进程。
- Agent 工具:
ssh_list返回已配置的主机(别名、地址、用户、认证方式),ssh_exec按别名执行一条命令,返回 stdout / stderr / 退出码。
面板右上角还有一个 「重启 DSH」 按钮:调用后宿主进程退出,由 systemd 的 Restart=always 拉起(约三秒),页面会轮询到恢复后自动刷新。
存储在 $DSH_HOME/ssh-hosts.json(0600)。密码与密钥口令不会离开宿主进程,接口只返回 hasPassword / hasPassphrase。没有遥测。
安装
# 从 GitHub
dsh plugin --profile web add github:MARYCOMPLEX/dsh-ssh-panel
# 或本地 tarball
pnpm pack
dsh plugin --profile web add ./dsh-ssh-panel-0.1.1.tgz
装完重启一次 dsh web。ssh2 会尝试编译可选的 native crypto binding;pnpm 12 默认拦截构建脚本,如果报 ERR_PNPM_IGNORED_BUILDS,在 $DSH_HOME/profiles/web/pnpm-workspace.yaml 里加:
allowBuilds:
ssh2: true
cpu-features: true
再重跑安装即可(不编译也能用,ssh2 有纯 JS 回退)。
使用
- 设置(齿轮)→ SSH 主机 → 添加主机:别名(比如
vps)、地址、端口、用户名、私钥路径或密码。 - 点 测试 验证,然后 保存。
- 对 agent 说「去 vps 上看看磁盘」——它会先
ssh_list找到vps,再ssh_exec。
工具
| 工具 | 参数 | 返回 |
|---|---|---|
ssh_list |
— | 主机 JSON 列表(不含密钥) |
ssh_exec |
host、command,可选 timeout_ms |
stdout、stderr、退出码;超过 256 KiB 截断 |
要求
- DSH
0.2.1-rc.2(已验证),webprofile - Node.js ≥ 22
开发
pnpm install
pnpm pack # dsh-ssh-panel-<version>.tgz
dsh plugin --profile web add ./dsh-ssh-panel-<version>.tgz
源码只有四处:lib/index.js(存储 / 路由 / 工具)、lib/client.js(Settings 里的 section)、lib/panel.html(面板 UI)、cordis.patch.yml(bundle 入口)。
License
MIT
No comments yet. Be the first to write one.