startGalway/dsh-secure-remote

dsh-secure-remote

Secure, stable SSH remote workspaces for DeepSeek Harness

Uncategorizeddeepseek-harnessdshremote-workspace

dsh-secure-remote

dsh-secure-remote is an independent DeepSeek Harness plugin that hardens SSH workspaces without forking or modifying DeepSeek Harness.

Highlights

  • Keeps existing SSH profiles, workspace RPCs and ssh_workspace v1 records compatible.
  • Enforces a remote Workspace root for file tools and rejects symlink/path escapes.
  • Fixes macOS PTY startup failures caused by long OpenSSH ControlPath values.
  • Reuses Unix SSH connections in a private 0700 directory and cleans them up on teardown.
  • Shows connected, connecting, degraded and disconnected status in the Web UI.
  • Preserves the official openRawChannel SSH stream used by Remote Agent installation and long-lived connections.
  • Falls back to the bundled SSH runtime when the unpublished @deepseek-ai/dsh-ssh package is unavailable; the peer dependency is optional.
  • Discovers SSH Config aliases and private keys without reading or displaying key contents.
  • Supports macOS, Linux and Windows as local clients; remote targets must be POSIX.

Requirements

  • DeepSeek Harness Web profile with a compatible @deepseek-ai/dsh-ssh interface.
  • Node.js 22 or newer.
  • OpenSSH client available as ssh on macOS/Linux or ssh.exe on Windows.
  • POSIX remote target for remote Workspace operations.

Install

After publishing, install a tagged release with:

dsh plugin --profile web add github:startGalway/dsh-secure-remote#v1.1.2

For local development:

dsh plugin --profile web add file:/absolute/path/to/dsh-secure-remote

Restart the Web profile after installation. Existing remote Workspaces do not need migration.

Security model

File tools are constrained to the configured remote Workspace root. Bash is intentionally unchanged: it has the full permissions of the remote SSH account and is not limited by the file-tool boundary. Host-key checking remains strict by default. Passwords are stored through the existing DSH credentials service and are never put in SSH arguments or status responses.

Platform support

Local clientSSH clientControlMasterStatus/reconnectRemote target
macOSsystem OpenSSHenabledsupportedPOSIX
Linuxsystem OpenSSHenabledsupportedPOSIX
Windowsssh.exedisabledsupportedPOSIX

Windows remote targets are rejected with REMOTE_OS_UNSUPPORTED.

Development

npm run check
npm test
npm run pack:check

See CONTRIBUTING.md and SECURITY.md before submitting changes.

License

MIT. See LICENSE.