wuwuzhige-sudo/dsh-terminal-panel ↗★ 3

dsh-terminal-panel

Terminal + SFTP tabs in the DeepSeek Harness (dsh) web conversation view — run commands on the harness host (or any SSH host) with persistent cwd and sudo prompt, plus a file browser over the same SSH connection. 核心用途是在 DSH 网页会话中直接嵌入终端窗口和 SFTP 文件浏览器,支持持久化工作目录和 sudo 提示。适合需要在对话过程中随时查看和操作服务器文件的用户。

패키지
dsh-terminal-panel
호환성
미검증
버전
1.6.0
라이선스
MIT
최근 업데이트
2026. 8. 16.

같은 패키지 이름의 다른 저장소

설치

검증된 bundle이 없거나 호환성 검사에 실패했습니다. 먼저 저장소 설명을 읽어 주세요. 전체 README 읽기 ↗

Configuration

FieldTypeDefaultDescription
trustedHostsstring[][]Extra hostnames (besides loopback) allowed to call the terminal RPC. Required when the web UI is served through a reverse proxy / Tailscale Serve with a real hostname.
sshTargetstring''SSH target for command execution, e.g. user@127.0.0.1 or user@my-server. Empty = run commands locally.
sshIdentitystring~/.ssh/dsh-terminalSSH identity file used for sshTarget.
sshUserstring''SSH username when sshTarget holds a bare host.
sshPasswordstring''SSH password (delivered via SSH_ASKPASS, never through a pty prompt). Empty = key auth.

Runtime configuration (no restart needed)

Open the 设置 button in either tab (or the first-run setup panel when no target is configured) and set host / username / password / key path — the Terminal and SFTP tabs share this one login. Settings persist in ~/.local/share/dsh-terminal-panel/config.json and take effect on the next command — no cordis.patch.yml edits or service restarts. The panel lists the host's detected addresses (Tailscale IP first) for convenience, and a one-click key initialisation for localhost targets.

SFTP tab

The SFTP tab opens at the target user's home directory and offers:

  • directory navigation (click, breadcrumbs, up button) with type/size columns
  • a two-column grid, 20 items per page with 上一页/下一页 pager buttons — the panel stays the same height as the terminal (no scrolling)
  • download files to the browser (saved via the browser download)
  • upload files from the local machine (native file picker)
  • new directory and delete (files, and empty directories only)

Transfers run through the system sftp client in batch mode, reusing the terminal's SSH credentials — password auth works without extra prompts (SSH_ASKPASS), key auth is used automatically when configured. The transfer cap is 64 MB per file (the payload crosses the HTTP layer as base64); for larger files use scp/rsync from the terminal tab. In local mode (sshTarget empty) the SFTP tab shows a hint pointing to the settings panel.

SSH mode (why you want it)

When dsh runs sandboxed (bwrap/user namespace — the default on Linux), the process cannot setuid, so sudo is unusable in local mode. In SSH mode the panel keeps one persistent ssh -t session (pseudo-tty) per terminal, exactly like an SSH client:

  • commands run in the host namespace of the sshd server → setuid/sudo work
  • sudo asks for the password only once per 15 minutes (credential cache is bound to the session's tty, just like a normal SSH terminal)
  • cd and environment persist natively inside the session
  • interactive programs (top, htop, …) work
  • the same mechanism turns the panel into a remote terminal for any SSH host:
- insert:
    - id: dsh-terminal-panel
      name: 'dsh-terminal-panel'
      config:
        trustedHosts:
          - myhost.tailXXXX.ts.net
        sshTarget: user@127.0.0.1      # localhost: sudo works
        # sshTarget: user@remote-host   # or any SSH host
        sshIdentity: /home//.ssh/dsh-terminal

Set up the identity once (one command, no password prompts afterwards):

ssh-keygen -t ed25519 -N "" -f ~/.ssh/dsh-terminal

### Runtime configuration (no restart needed)

Open the **设置** button in either tab (or the first-run setup panel when no
target is configured) and set host / username / password / key path — the
**Terminal and SFTP tabs share this one login**. Settings persist in
`~/.local/share/dsh-terminal-panel/config.json` and take effect on the next
command — no `cordis.patch.yml` edits or service restarts. The panel lists
the host's detected addresses (Tailscale IP first) for convenience, and a
**one-click key initialisation** for localhost targets.