Dalld/dsh-ssh-plugin ↗★ 0

dsh-ssh-plugin

支持私钥不离主进程的Agent安全SSH连接与文件传输 适合需要授权Agent远程部署服务,同时保障私钥安全的技术人员。

包名
dsh-ssh-plugin
兼容性
待验证
版本
0.7.1
许可证
MIT
最近更新
2026年10月23日

同名包的其他仓库

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Dalld/dsh-ssh-plugin

7. 配置参考

写在插件行的 config(YAML),或让面板写 /settings.json(面板优先级更高,即时生效)。

config:
  transport: ssh2            # ssh2 | openssh | auto
  hostKeyPolicy: accept-new  # accept-new | strict | off
  dangerPolicy: deny         # allow | ask | deny
  audit: true
  multiplex: false           # 仅 OpenSSH 后端(POSIX)
  defaultTimeoutMs: 30000
  connectTimeoutMs: 20000
  maxOutputBytes: 200000
  hosts:
    - alias: prod
      host: 1.2.3.4
      port: 22
      user: root
      keyCred: DSH_SSH_PROD_KEY   # 面板粘贴私钥后自动生成的引用名
      mode: readonly              # default | readonly
      group: prod
    - alias: winbox
      host: 10.0.0.12
      user: Administrator
      keyPath: C:\Users\me\.ssh\id_ed25519
      shell: powershell           # posix | powershell | cmd

单主机可选:keyEnv keyPath keyCred passphraseEnv passwordEnv passwordCred agent timeoutMs connectTimeoutMs maxOutputBytes defaultCwd shell mode group enabled。

配置是严格的:未知字段、非法 host/user/port、坏 JSON 都会明确报错,不静默忽略。

数据目录

/ssh/:hosts.json、known_hosts、settings.json、audit.jsonl、cm/(OpenSSH 复用套接字)。

迁移到新机器时,前三个文件可整目录拷贝;凭据库里的密钥/密码不可迁移,需要重填, 或改用 keyPath / keyEnv。