Scan your whole stack
From OX Research Newsroom
Are you using dsh-ssh-mount?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.1.0
dsh-ssh-mount was last scanned on 1 Dec 2026 at version 0.1.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.1.0 LATEST | 1 Dec 2026 | No rules fired |
| 0.0.0-stage | 1 Dec 2026 | Not shown |
Findings for v0.1.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.1.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
宗旨: 远程服务器上无额外安装等等,让dsh与ai能够像在远程服务器上运行一般,实现完美地衔接、转换与挂载。
把 SSH 服务器上的目录 变成 DSH(DeepSeek Harness)的工作区:在本地跑 dsh,文件读写走 SFTP,bash / git / rg 走 SSH exec,内置终端走远端 PTY。远端只使用 sshd 自带能力,不在服务器上运行任何 AI 进程。
本地 dsh ── SSH/SFTP ──> 远端 sshd ──> 远端 shell / git / ripgrep
│
└─ 影子目录(本地占位)让 DSH 的工作区、会话、路径处理保持原生
/ssh mount 或界面挂载后,远端目录以本地“影子目录”形式加入 DSH 工作区列表,可直接选择、切换、恢复会话。FS_STALE_VERSION)。bash、sh、zsh、dash、git、rg 在远端 cwd 执行,环境变量随行(PATH 与 ELECTRON_RUN_AS_NODE 除外:远端 PATH 保持远端语义;值里出现影子目录或 ssh:// 拼写时自动翻译成远端路径);DSH 沙箱前缀会被识别并解包。Windows 桌面版的 pwsh 工具(pwsh -Command,含 Windows ACL 沙箱运行器与桌面 Electron 跳板)同样路由到远端:命令在远端 bash -c 下执行(与远端 bash 工具一致),$env:NAME 自动改写为 $NAME;命令文本里的影子路径(Windows 大小写、两种分隔符均可)会翻译为远端拼写,远端没有 bash 时回退到其自带的 pwsh。pwsh 终端方言同样落到远端:远端有 pwsh 就用它,没有则回退为远端 bash(带受控提示符标记,就绪检测照常工作)。node:fs/promises,变更追踪器把远端 git index 暂存到本地时,自动同步一份到远端 /tmp 镜像,远端 git 能直接读。ssh_* 代理工具、/ssh 命令。要求:本地 DSH 0.2.x;远端任意 POSIX + sshd(含 sftp)即可。
# 在本地 DSH 安装目录/终端中,把本包加入某个 profile(web / tui / headless ...)
dsh plugin --profile web add /path/to/dsh-ssh-mount
该包声明了 dsh.bundle,插件管理器会把它作为可选 bundle 列出;启用后重启 DSH。也可以手工把 dsh-ssh-mount 加入 $DSH_HOME/profiles/<name>/package.json 的 dsh.profile.bundles。
主机可以来自 ~/.ssh/config(自动解析 Host 块,Include 指令会就地展开,支持 ~、相对路径与 */? 通配),也可以在 profile 的 cordis.patch.yml 中显式配置:
- id: ssh-mount
config:
hostKeyPolicy: accept-new # accept-new | strict
hosts:
- alias: dev # 在 dsh 中引用主机用的短名
host: 10.0.0.5
port: 22
user: alice
authType: key # key | password;password 只用密码、绝不读取私钥
identityFile: C:/Users/alice/.ssh/id_ed25519
# passphrase / password 可选(secret)
# proxyJump: bastion # 可选:经同名主机(ssh-config 或本列表)跳转
| 字段 | 默认 | 说明 |
|---|---|---|
hosts |
[] |
显式主机,覆盖同名 ssh-config 主机 |
hosts[].authType |
自动 | key 只用私钥/agent,password 只用密码(不读取任何私钥),省略为密钥优先、密码兜底 |
sshConfigPath |
~/.ssh/config |
备用 OpenSSH 配置路径 |
hostKeyPolicy |
accept-new |
首次信任并记录,或只信任已记录主机 |
connectTimeoutMs |
15000 |
连接超时 |
keepaliveIntervalMs |
10000 |
保活间隔 |
watchIntervalMs |
1500 |
远端变更轮询(文件树自动刷新) |
announceToAgent |
true |
向代理系统提示注入远端工作区说明 |
已知主机指纹保存在 $DSH_HOME/ssh-mount/known_hosts.json。挂载表与影子目录位于同一目录(mounts.json、mnt/),重启后自动恢复。若 $DSH_HOME 本身是 junction / 软链接,影子目录按真实路径(realpath)记录与匹配,DSH 工作区、会话头和工具调用携带链接或真实任一种拼写都能正确路由。
DSH 左侧栏点「SSH 挂载」图标(与「插件」「自动化任务」并列)打开全局面板:
~/.ssh/config 或插件配置的主机)点「认证…」,可切换连接方式并填写私钥口令或登录密码;保存后列表显示「已存口令」,也可随时清除。~/.ssh/config 与插件配置里的主机只读展示(认证设置除外)。界面添加的主机与各主机的口令都保存在 $DSH_HOME/ssh-mount/hosts.json(secrets 按别名存储,权限尽量收紧),与插件配置、~/.ssh/config 合并,优先级:界面 > 插件配置 > ssh-config。选择「密码登录」的主机只使用登录密码:不读取 identityFile、不探测 ~/.ssh 默认私钥、不经过 ssh-agent,因此本机没有可用私钥也不影响连接。
/ssh 命令/ssh status 查看已挂载工作区与连通性
/ssh hosts 列出可用 SSH 主机
/ssh mount dev /home/alice/project 挂载远端目录
/ssh mount dev /home/alice/project 项目 A 挂载并命名工作区(重复挂载会更新名称)
/ssh cd dev /home/alice/project 挂载并切换当前工作目录
/ssh unmount dev /home/alice/project 卸载(按 id 或 alias[+路径])
/ssh forget dev 忘记已记录的主机指纹(服务器重装换钥后使用)
挂载后影子目录会自动注册为 DSH 工作区,也可以在普通工作区选择器里见到它。
模型侧自动获得四个工具:ssh_hosts、ssh_mount、ssh_unmount、ssh_status。你可以直接对 DSH 说“把 dev 上的 /srv/app 当作工作区”,无需手动输入命令。模型发起的卸载(ssh_unmount)会像沙箱升档一样先弹出审批面板请求你确认;/ssh unmount 与侧边栏卸载是用户自己发起的,不会打扰。
同一个远端文件有以下等价写法,工具和命令里都可使用:
| 拼写 | 示例 |
|---|---|
| 远端 POSIX | /home/alice/project/src/app.py |
ssh:// |
ssh://dev/home/alice/project/src/app.py |
| 反斜杠(Windows 路径折叠) | \home\alice\project\src\app.py |
| 盘符折叠(Windows) | F:\home\alice\project\src\app.py |
| 影子目录 | $DSH_HOME/ssh-mount/mnt/dev/home_alice_project-xxxxxxxx |
路由按“最长远端根优先”,同名多主机歧义会拒绝而不是猜。本地已存在的路径永远保持本地语义。
本地 DSH 的沙箱/审批决定模型能做什么,SSH 主机决定命令在哪运行。二者这样衔接:
write、edit 工具对远端路径同样携带会话的沙箱策略。read-only:远端写入被拒绝(FS_SANDBOX_DENIED),模型收到与本地一致的 [sandbox: …] 标记和升档提示;按提示带 sandbox_permissions + justification 重试一次,就会弹出 DSH 的用户审批,批准后本次写入放行。workspace-write:允许写入当前会话工作区对应挂载根之下的远端文件(影子目录就是该远端根的本地拼写);写其它挂载或会话工作区之外的远端路径同样需要升档审批。danger-full-access:直接放行。bash / pwsh / 终端经 SSH 在远端账号下执行。本地沙箱(Windows ACL、Seatbelt、bwrap 等)只约束本机内核,约束不到远端;DSH 的架构本身也规定“远程执行替换沙箱 seam”。插件会识别并剥离本地沙箱包装参数,把内层命令原样发到远端——因此 read-only 会话里的远端命令仍能改动远端文件。远端的安全边界是 sshd 与该 SSH 账号的权限,请不要把本地沙箱当作远程安全边界。accept-new 下首次连接记录指纹;服务器重装换钥后用 /ssh forget <alias> 清除,下次连接重新信任。node:fs / node:fs/promises 桥接覆盖桌面面板与文件树需要的全部操作:stat / 列目录(含 recursive)/ 读写流 / readFile / writeFile / appendFile / copyFile(含 COPYFILE_EXCL)/ mkdir / rename / unlink / rmdir / rm 都作用于远端;销毁类调用只接受影子路径(严格位于挂载根之下)或 ssh:// 拼写,裸拼写不会被误判为远端。宿主临时目录里的 git index 会自动镜像到远端 /tmp,远端 git 可直接读取。写远端工作区仍推荐走 ctx.fs 工具(带版本保护)。仓库自带两套测试,全部只连本地 Docker sshd:
# 1) 构建并启动测试容器(ubuntu + openssh + git + ripgrep)
docker build -t dsh-ssh-test -f test/docker/Dockerfile test/docker
docker run -d --name dsh-ssh-test -p 127.0.0.1:2222:22 dsh-ssh-test
# 2) 不启动 DSH 的快速冒烟(引擎/SFTP/路由/子进程/PTY/桥接/挂载)
npm test
# 3) 端到端:真实 dsh CLI + 临时 DSH_HOME + 探针 profile
npm run test:e2e
端到端默认使用 D:/DeepSeek/DSH Desktop/resources/app/node_modules/@deepseek-ai/dsh/lib/bin.js,可用 DSH_E2E_CLI 指向其它安装。所有测试使用 test/docker/test_key 这把一次性密钥,与真实服务器无关。
| 文件 | 作用 |
|---|---|
lib/index.js |
插件入口:读取配置、启动引擎、装配各 seam |
lib/client.js |
左栏「SSH 挂载」全局面板(主机管理 / 连接方式 / 目录浏览 / 挂载) |
lib/ui-service.js |
浏览器 RPC 服务 sshMount(describe/testHost/browse/addHost/mount…) |
lib/host-store.js |
界面添加主机的持久化(hosts.json) |
lib/engine.js |
ssh2 连接、主机键校验、SFTP 缓存、exec |
lib/state.js |
挂载表、影子目录、路径拼写匹配 |
lib/remote-fs.js |
ctx.fs 远端路由(读写/编辑/流/轮询 watch) |
lib/remote-process.js |
ctx.subprocess 远端路由与 PTY 终端 |
lib/fs-bridge.js |
node:fs/promises 桥接与 /tmp 镜像 |
lib/route.js |
白名单(含 pwsh)、沙箱解包、路径翻译、远端脚本构造 |
lib/mount-tools.js |
ssh_* 工具与 /ssh 命令 |
lib/hosts.js lib/sftp.js lib/protocol.js lib/collector.js |
ssh-config 解析、SFTP 助手、拼写/引用、输出收集 |
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.