Cumeskey/dsh-ssh-remote-tunnel ↗★ 0

dsh-ssh-remote-tunnel

自动建立指向远端LLM服务器的SSH端口转发隧道 适合需要安全连接远端私有部署模型、支持自动登录和健康监测的用户。

套件
dsh-ssh-remote-tunnel
相容性
待驗證
版本
0.3.0
最近更新
2026年9月20日

安裝

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

配置

方式一:通过 DSH Desktop 设置页面(推荐)

  1. 打开 DSH Desktop → 左下角「设置」→「SSH 隧道」
  2. 填写远端 IP / 端口 / 用户 / 密码 / 客户端
  3. 点击「保存配置」→「启动隧道」

方式二:通过 cordis.patch.yml(headless / 持久化)

- insert:
    - id: ssh-remote-tunnel
      name: dsh-ssh-remote-tunnel
      config:
        host: 10.0.0.1              # SSH 服务器(替换为你的 IP)
        sshPort: 22                 # SSH 端口
        sshUser: youruser           # SSH 用户
        password: 'yourpassword'    # 自动登录密码(字符串,注意加引号)
        localPort: 16324            # 本地监听端口
        remoteHost: localhost       # 远端转发目标
        remotePort: 8000            # 远端 vLLM 端口
        sshClient: auto             # auto | ssh | plink(默认 auto,优先 OpenSSH,无需 plink)
        # sshPath: 'C:\\Windows\\System32\\OpenSSH\\ssh.exe'   # 留空则自动查找
        # plinkPath: 'C:\\Program Files\\PuTTY\\plink.exe'     # 仅 plink 客户端需要
        hostKeyFingerprint: 'ssh-ed25519 255 SHA256:xxxx'  # 主机密钥指纹(可选)
        apiBaseUrl: http://localhost:16324/v1
        providerKey: qwen           # 模型选择器里显示的 provider 名(可改为任意,如 ssh-vllm)
        displayName: 'Qwen vLLM (SSH Tunnel)'
        models:                     # 注册进模型选择器的模型
          - id: /model
            name: 'Qwen3.8 vLLM'
          - id: qwen3.8-27b-fp8
            name: 'Qwen3.8 27B FP8 (vLLM)'
        registerProvider: true
  • 不想把密码写进配置文件时,删掉 password 字段并设置环境变量 QWEN_SSH_PASSWORD(或配置 passwordEnv: 其他变量名);不填密码则走密钥认证。
  • 密码登录且 sshClient: auto/ssh 时,需要本机存在密码注入手段(Windows 用系统 OpenSSH 的 SSH_ASKPASS,Linux/macOS 需 sshpass)。若都不可用且未装 plink,插件会明确报错提示。