# dsh-secure-remote [![CI](https://github.com/startGalway/dsh-secure-remote/actions/workflows/ci.yml/badge.svg)](https://github.com/startGalway/dsh-secure-remote/actions/workflows/ci.yml) [![Latest release](https://img.shields.io/github/v/release/startGalway/dsh-secure-remote?display_name=tag&sort=semver&color=2ea44f)](https://github.com/startGalway/dsh-secure-remote/releases) [![License](https://img.shields.io/github/license/startGalway/dsh-secure-remote?color=blue)](LICENSE) [![Platforms](https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-8a63d2)](#platform-support) [![SSH](https://img.shields.io/badge/remote-POSIX%20over%20SSH-f39c12)](#security-model) `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: ```sh dsh plugin --profile web add github:startGalway/dsh-secure-remote#v1.1.2 ``` For local development: ```sh 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 client | SSH client | ControlMaster | Status/reconnect | Remote target | | --- | --- | --- | --- | --- | | macOS | system OpenSSH | enabled | supported | POSIX | | Linux | system OpenSSH | enabled | supported | POSIX | | Windows | `ssh.exe` | disabled | supported | POSIX | Windows remote targets are rejected with `REMOTE_OS_UNSUPPORTED`. ## Development ```sh npm run check npm test npm run pack:check ``` See [CONTRIBUTING.md](CONTRIBUTING.md) and [SECURITY.md](SECURITY.md) before submitting changes. ## License MIT. See [LICENSE](LICENSE).