Repository navigation
Releases: scientificmaniac/dsh-ssh-vault
Release list
dsh-ssh-vault V2.0.0
Windows only + Connection trust fence
Breaking release: the plugin is now Windows only — declared, documented and enforced — and the Settings routes now cross the Host Connection trust fence.
This release closes two review findings.
1. Platform promise vs. code
The README promised Windows / Linux / macOS while the implementation was Windows-only: the vault data key depends on Windows DPAPI and the SSH_ASKPASS helper is a Windows .cmd. On other platforms the old code silently wrote the data key to key.json as plaintext — a security downgrade, not support. 2.0.0 removes the false promise instead of pretending.
package.jsondeclaresos: ["win32"]; installation is refused elsewhere.apply()and theVaultconstructor callassertSupportedPlatform()and fail with a clear message on any other platform. No code path falls back to a plaintext key.- Every surface says Windows only: package description/
meta, Settings card (locale/en.json,locale/zh.json), marketplace entry, README (overview, requirements, limitations, FAQ), CONTRIBUTING and SECURITY. - The SSH targets may still be Linux/Unix hosts — only the machine running DSH must be Windows.
2. Settings routes now ask the Connection service for a rejection
/ssh-vault/* can read and write credentials and private keys, but it never called ctx.connection.requestRejection(req) — unlike /api and the built-in route plugins.
- Every request now asks the Host Connection service first: the same Host/Origin check (defeats DNS rebinding and cross-site calls) and browser-session authentication as
/api. - The check runs before the method check, before body parsing, and before any vault access. Rejected requests get
401/403withcache-control: no-store, and cannot read host data, trigger a probe, or learn whether an action exists. - A missing
connectionservice (non-web composition) keeps the previous behaviour; the surrounding server's authentication remains the backstop.
Tests
test/platform.mjspins the platform declaration topackage.jsonand exercises the refusal path (includingVaultandapply) by temporarily rewritingprocess.platform.- The settings-API suite covers 401/403 bodies, no-store, ordering before 405/400, and that rejected requests never write to the vault;
test/host-apply.mjscaptures the registered route and proves the hostconnectionservice is wired through. - 314 tests total, all green.
Upgrading (Windows)
Invoke-WebRequest -Uri "https://github.com/scientificmaniac/dsh-ssh-vault/releases/download/v2.0.0/dsh-ssh-vault-2.0.0.tgz" -OutFile "dsh-ssh-vault-2.0.0.tgz"
dsh plugin --profile desktop install .\dsh-ssh-vault-2.0.0.tgzcurl -LO https://github.com/scientificmaniac/dsh-ssh-vault/releases/download/v2.0.0/dsh-ssh-vault-2.0.0.tgz
dsh plugin --profile desktop install ./dsh-ssh-vault-2.0.0.tgzRestart DSH after upgrading. No data migration is needed: the vault format is unchanged.
Linux / macOS users
2.0.0 will not install there — intentionally. v1.15.0 is the last version that installs on other platforms, but it can only protect the key with DPAPI on Windows; elsewhere it writes the key as plaintext. Do not use it on a non-Windows machine for real credentials.
Checksums
SHA256 dsh-ssh-vault-2.0.0.tgz 4c12b74e4e87104f280391c2e5308274755fe612eab3102e43461e097957ff0a
SHA256 dsh-ssh-vault-2.0.0.zip f7885315608924760a74f6735afdb85be44dc2417c1bdcd46b5d614b63e5cbf2
SHA256SUMS.txt is attached as well.
dsh-ssh-vault 2.0.0(中文)
破坏性版本:插件现在仅支持 Windows——声明、文档与代码一致;同时设置接口补上了 Host Connection 信任栅栏。
本版本收口两条评审意见。
1. 平台承诺与代码不符
此前 README 声称支持 Windows / Linux / macOS,但实现是 Windows-only:保险库数据密钥依赖 Windows DPAPI,SSH_ASKPASS 辅助程序是 Windows 的 .cmd。在其它平台上,旧代码会把数据密钥以明文写进 key.json——这是安全降级,不是支持。2.0.0 选择去掉这句不实的承诺。
package.json声明os: ["win32"];其它平台安装会被拒绝。apply()与Vault构造函数调用assertSupportedPlatform(),在其它平台上以明确错误拒绝启动;任何路径都不存在明文密钥回退。- 所有对外文案都写明仅 Windows:包描述与
meta、设置卡片(locale/en.json、locale/zh.json)、市场条目、中英 README(简介、环境要求、已知限制、FAQ)、CONTRIBUTING 与 SECURITY。 - SSH 的目标仍可以是 Linux/Unix 主机——限制的只是运行 DSH 的这台机器。
2. 设置接口补上 Connection 信任栅栏
/ssh-vault/* 能读写凭据与私钥,却从未调用 ctx.connection.requestRejection(req)——/api 与内置路由插件都调用了。
- 现在每个请求先问 Host Connection 服务:与
/api相同的 Host/Origin 校验(防 DNS rebinding 与跨站调用)和浏览器登录认证。 - 这一步发生在方法检查、请求体解析和任何保险库访问之前。被拒绝的请求得到
401/403与cache-control: no-store,既读不到主机数据、触发不了探测,也无法探测动作是否存在。 connection服务缺失时(非 Web 组合)保持原行为,由外层服务器鉴权兜底。
测试
test/platform.mjs把平台声明与package.json钉在一起,并通过临时改写process.platform覆盖Vault与apply的拒绝路径。- 设置接口测试覆盖 401/403 响应体、no-store、先于 405/400,以及被拒请求绝不写库;
test/host-apply.mjs捕获注册的路由,验证宿主connection服务确实被接线进来。 - 全套 314 项,全绿。
升级(Windows)
Invoke-WebRequest -Uri "https://github.com/scientificmaniac/dsh-ssh-vault/releases/download/v2.0.0/dsh-ssh-vault-2.0.0.tgz" -OutFile "dsh-ssh-vault-2.0.0.tgz"
dsh plugin --profile desktop install .\dsh-ssh-vault-2.0.0.tgz升级后重启 DSH;保险库格式未变,无需迁移数据。
Linux / macOS 用户
2.0.0 无法在这些平台安装——这是有意的。v1.15.0 是最后一个能在其它平台安装的版本,但它在非 Windows 上只能把密钥以明文落盘。请不要在非 Windows 机器上用真实凭据。
校验和
SHA256 dsh-ssh-vault-2.0.0.tgz 4c12b74e4e87104f280391c2e5308274755fe612eab3102e43461e097957ff0a
SHA256 dsh-ssh-vault-2.0.0.zip f7885315608924760a74f6735afdb85be44dc2417c1bdcd46b5d614b63e5cbf2
完整变更见 CHANGELOG.zh-CN.md。
dsh-ssh-vault v1.15.0
dsh-ssh-vault 1.15.0
The whole plugin now follows the DSH interface language, and /hosts results are visible in a brand-new conversation instead of appearing only after the first message.
English | 简体中文
Highlights
- Follows the DSH interface language. Switch DSH to English and the Settings page,
/menu entries, in-conversation SSH cards,/hostsoutput, transport diagnostics, Settings-API errors, vault errors and background-job status all switch too — immediately, without a reload. The host reads the persistedlocale.preference, so it works even when the OS language differs from the DSH language. - Model-facing definitions stay English. Tool names, descriptions and parameter schemas belong to the model interface, not the UI.
/hostsresults appear before the first message. DSH treats a transcript that contains only command rows as an inactive view, so a fresh-conversation/hostsused to run invisibly until the first prompt was sent. The plugin now mirrors the/hostscards — running state included — in the composer dock while the session is blank, and steps aside once the transcript has real content.- A bare
/hostsanswers within seconds. Cold-cache host probes run in parallel with a 4s budget instead of serial 15s probes. - Clearer command hint. The hint explains the two-step menu pick: press Enter again to list hosts.
- 279 regression tests, including three new suites (
i18n,host-apply,client-smoke).
Install / upgrade
# download the release asset, then install it into the profile that runs DSH
curl -LO https://github.com/scientificmaniac/dsh-ssh-vault/releases/download/v1.15.0/dsh-ssh-vault-1.15.0.tgz
dsh plugin --profile desktop install ./dsh-ssh-vault-1.15.0.tgzWindows PowerShell:
Invoke-WebRequest -Uri "https://github.com/scientificmaniac/dsh-ssh-vault/releases/download/v1.15.0/dsh-ssh-vault-1.15.0.tgz" -OutFile "dsh-ssh-vault-1.15.0.tgz"
dsh plugin --profile desktop install .\dsh-ssh-vault-1.15.0.tgzFrom a checkout:
dsh plugin --profile desktop install .Restart DSH after upgrading (host code changed). Client-only changes need a page reload. Requires Node ≥ 20 and an OpenSSH client.
Checksums
SHA256 dsh-ssh-vault-1.15.0.tgz 08988d31e42c4c62e3065e1ccec893971776c98ba2d07db7892cf1a151f6288d
SHA256 dsh-ssh-vault-1.15.0.zip 0c925f6873bcfc431b2fd98a7dbf89cc04112cfa11a9b3fb0dba08fcd9f09eb6
SHA256SUMS.txt is attached as well.
dsh-ssh-vault 1.15.0(中文)
整个插件现在跟随 DSH 的界面语言;新对话里 /hosts 的结果也不再「看不见」,而是直接显示出来。
更新内容
- 界面语言跟随 DSH。 DSH 切成英文后,设置页、
/菜单项、对话内 SSH 卡片、/hosts结果、连接诊断、设置接口错误、保险库错误与后台任务状态都会立即换成英文,无需刷新页面。Host 侧读取的是持久化的locale.preference,所以系统语言与 DSH 语言不一致时同样正确。 - 面向模型的工具定义保持英文。 工具名、描述与参数 schema 属于模型接口,而不是界面。
- 首条消息之前就能看到
/hosts结果。 DSH 把「整段记录只有命令行」的会话判定为非活跃视图,以前全新会话里/hosts虽然执行了,界面却什么都不显示,要等发出第一条消息才看到卡片。插件现在会在会话仍空白时把这些/hosts卡片(含执行中状态)镜像到输入框上方的 dock,对话区有真实内容后自动隐藏,不会重复。 - 无参
/hosts几秒内响应。 检查缓存为空时改为并行探测、总预算 4 秒(原先串行 15 秒 × 台数)。 - 提示更清楚。 输入提示写明:在
/菜单里选中后,再按一次回车即无参执行、列出主机。 - 279 项回归测试,新增
i18n、host-apply、client-smoke三套。
安装 / 升级
# 下载发行版附件,然后装进运行 DSH 的 profile
Invoke-WebRequest -Uri "https://github.com/scientificmaniac/dsh-ssh-vault/releases/download/v1.15.0/dsh-ssh-vault-1.15.0.tgz" -OutFile "dsh-ssh-vault-1.15.0.tgz"
dsh plugin --profile desktop install .\dsh-ssh-vault-1.15.0.tgz或从本地仓库安装:dsh plugin --profile desktop install .
升级后请重启 DSH(Host 代码有改动);只有 client 改动时刷新页面即可。环境要求:Node ≥ 20,且本机有 OpenSSH 客户端。
校验
SHA256 dsh-ssh-vault-1.15.0.tgz 08988d31e42c4c62e3065e1ccec893971776c98ba2d07db7892cf1a151f6288d
SHA256 dsh-ssh-vault-1.15.0.zip 0c925f6873bcfc431b2fd98a7dbf89cc04112cfa11a9b3fb0dba08fcd9f09eb6
完整变更见 CHANGELOG.zh-CN.md。
dsh-ssh-vault v1.14.2
这个版本修的是真实使用中会让人误判的问题:多行 PowerShell 静默不执行、并发连接把管理账号锁死、以及错误输出被 XML 淹没。全部改动都在 Host 侧,安装后需要重启 DSH。
最重要的两条
① 多行 PowerShell 不再静默失败
旧实现用 powershell -Command - 从 stdin 逐行读脚本,here-string(@'…'@)和 foreach (…) {…} 这类多行块会在解析途中被拆散。拆散后的语法错误不以非零退出码回传——调用方被告知"执行了",实际什么都没发生。
现在改用 -EncodedCommand(Base64 UTF-16LE)整体传入,一次解析。实测 here-string 写文件、多行 foreach 遍历数组、.Count 全部正确。
② 同一主机的连接串行化
每次调用都新建 SSH 连接。短时间并发一批(尤其 scp)会触发 sshd 的连接数限制,更糟的是累积失败认证计数把账户推向锁定——Windows 上账号一旦锁定,连密钥登录一起失效,整条管理通道断掉。
现在按别名排队,ssh_run / ssh_probe / ssh_transfer / 设置页体检 / /hosts 五条路径全覆盖。后台任务免排队,避免长任务堵死整台主机。
其余修复
- 账户锁定成为被点名的原因:Windows OpenSSH 对锁定账户直接断开连接,不回
Permission denied,所以"端口通、banner 正常、就是连不上"原先只指向防火墙。现在会点名锁定,并给出net user/faillock检查命令 - 错误输出恢复纯文本:
powershell.exe会把 error 流序列化成 CLIXML 写进 stderr,还回显整段脚本源码。现在脚本内部合并 error 流,每个 ErrorRecord 压成一行[error] … ssh_transfer不再甩锅路径:连接中断时不再弹"本地或远端路径不存在"- 下载自动创建本地父目录
- 危险命令预警:执行
net accounts、lockout threshold、usermod -L等命令前提示"可能锁死管理账号"
安装
dsh plugin --profile desktop install dsh-ssh-vault完整性校验
发布包版本:1.14.2
请下载对应的发布包,并使用下列 SHA-256 值验证文件完整性。
| 文件 | SHA-256 |
|---|---|
dsh-ssh-vault-1.14.2.tgz |
19d2de4b112392e6d7a49f768528a87890bb1d2523b25ad59cb34980d23c50d7 |
dsh-ssh-vault-1.14.2.zip |
aded87874ab82a7483169043a71f8c4bd68e8fe0ddce4cf83e14085ada80684c |
dsh-ssh-vault v1.13.0
为 DeepSeek Harness 智能体提供安全的 SSH 连接与远程命令执行能力。
主机地址、端口、账号、口令和私钥均存储在加密保险库中,对话中仅使用主机别名。模型不会直接接触口令,凭据也不会出现在命令行参数或远端进程列表中。
✨ 核心特性
1. 对话内终端卡片
ssh_run:在远程主机上执行命令。ssh_probe:探测 SSH 主机的连接状态。ssh_transfer:执行文件传输操作。- 调用结果渲染为可滚动的终端卡片。
- 显示连接状态指示点与命令退出码。
2. /hosts 命令
提供不经过模型中转的主机管理与操作入口:
- 直接探测主机连接状态。
- 在指定主机上执行命令。
- 将执行结果拆分为两张独立卡片:
- 连接状态:展示主机连接情况。
- 命令执行:展示命令输出及执行结果。
3. 可视化设置界面
- 支持新增、编辑和删除 SSH 连接。
- 自动执行连接健康检查,并以绿点或红点显示状态。
- 支持口令认证与私钥认证。
- 支持上传私钥,并自动收紧私钥文件权限。
📦 安装
环境要求
- Node.js ≥ 20
- 本机已安装 OpenSSH 客户端
- 支持 Windows、Linux 和 macOS
安装插件
dsh plugin --profile desktop install dsh-ssh-vault🔐 安全模型
凭据加密与密钥保护
- 加密算法:使用 AES-256-GCM 加密保险库数据。
- Windows 密钥保护:使用 DPAPI 保护数据密钥。
- 主口令派生:使用 scrypt 从主口令派生密钥。
- 凭据隔离:对话中只使用主机别名,不直接暴露连接凭据。
SSH 认证与远程执行
- 本地 SSH 认证:通过
SSH_ASKPASS提供口令,避免将口令放入命令行参数。 - 远端 sudo 认证:通过标准输入(stdin)预置口令,避免将口令作为命令行参数传递。
- 主机密钥管理:使用独立的
known_hosts文件,并启用HashKnownHosts。 - 用户环境隔离:不修改或触碰用户现有的
~/.ssh配置。
设置界面与日志安全
- 设置界面通过 HTTP 请求体(body)提交口令。
- 口令不会写入会话日志。
- 凭据保存在本地加密保险库中。
⚠️ 已知限制
- 密钥保护平台限制:DPAPI 密钥保护仅适用于 Windows。
- 认证方式限制:设置界面目前仅支持口令认证和私钥认证。
- 并发访问限制:保险库尚未实现跨进程锁。
- 输出方式限制:前台调用暂不支持流式输出;长时间运行的任务请使用
run_in_background。
🧩 扩展与开发
插件围绕 SSH 连接管理、凭据安全存储、远程命令执行和文件传输等能力提供扩展基础。
建议在后续开发文档中补充以下内容:
- 插件架构与模块依赖关系
ssh_run、ssh_probe和ssh_transfer的接口定义- 新增认证方式与传输后端的扩展方法
- 凭据生命周期、异常处理及资源清理机制
- 安全边界、权限要求与威胁模型
✅ 完整性校验
发布包版本:1.13.0
请下载对应的发布包,并使用下列 SHA-256 值验证文件完整性。
| 文件 | SHA-256 |
|---|---|
dsh-ssh-vault-1.13.0.tgz |
b0e571022d7663ad659cbe4d29362bbcd93b50672df88576ecf1b4c5ba5e3bdd |
dsh-ssh-vault-1.13.0.zip |
f6a6e4d2d38f8f8a4c28edb30d650e875cc040b3771154797c3d2a0e79c09824b8 |
校验命令
Linux:
sha256sum dsh-ssh-vault-1.13.0.tgz
sha256sum dsh-ssh-vault-1.13.0.zipmacOS:
shasum -a 256 dsh-ssh-vault-1.13.0.tgz
shasum -a 256 dsh-ssh-vault-1.13.0.zipWindows PowerShell:
Get-FileHash .\dsh-ssh-vault-1.13.0.tgz -Algorithm SHA256
Get-FileHash .\dsh-ssh-vault-1.13.0.zip -Algorithm SHA256📚 文档
建议提供中英文双语文档:
README.md:中文说明README.en.md:English documentation
文档应包含架构图(Mermaid)、安装与配置、功能说明、扩展点、凭据生命周期及安全边界。