Introduction¶
The core design philosophy of DeepSeek Harness (DSH) is “Everything is a plugin.” When performing remote automation tasks, it often requires installing specific desktop control software or using RDP. The pureexe/dsh-windows-remote-ssh plugin solves this problem: it allows DSH to connect to a Windows machine over SSH and provides the same tool surface as the local dsh-click plugin. This means you can run Harness on Linux, macOS, or Windows, while the remote side only needs to run Windows and an SSH server.
Core Features¶
The plugin adds a set of remote control tools to DSH, with the following key capabilities:
* Application management: Lists running applications (app_list) and launches a specified application (app_launch).
* Screen operations: Takes screenshots (screen_shot) and reads screen content via UI Automation (screen_read).
* Input interaction: Simulates mouse clicks, keyboard input, scrolling, and key presses (click, type, scroll, key).
* Security and isolation:
* All modifying operations (input interactions) require approval by default.
* Does not steal mouse/keyboard focus by default (unless explicitly allowed).
* Rejects stale observations.
* Checks process identity.
* Agent-free deployment: No agent or third-party module needs to be preinstalled on the target machine.
Installation and Enablement¶
Install it using DSH’s plugin management command:
dsh plugin --profile web add "github:pureexe/dsh-windows-remote-ssh#main"
After installation, specify the connection details in the configuration file. An example configuration is shown below (usually in cordis.patch.yml):
- insert:
- id: dsh-windows-remote-ssh
config:
ssh:
host: <ip_address>
user: <username>
# 推荐使用私钥而非密码
# privateKeyPath: /path/to/id_ed25519
autoApproveWindows: ['^Notepad']
Usage¶
Connection details can be specified via the configuration file, environment variables, or parameters passed during tool invocation.
1. Configure a default connection
Set host, user, and either password or privateKeyPath in config.ssh. This way, the ssh parameter can be omitted during tool invocation, and the default target is used directly. This approach is recommended for fixed target machines.
2. Specify the target on demand
Pass the ssh parameter directly during tool invocation. The parameters include host, port, user, password, or privateKeyPath. This is suitable when the target is not fixed or changes dynamically in a conversation. Note that this approach will expose credentials in the conversation context.
3. Use environment variables
Use the environment variables SSH_HOST, SSH_PORT, SSH_USER, SSH_PASSWORD, SSH_KEY_PATH, and SSH_KEY_PASSPHRASE to pass credentials, avoiding writing sensitive information into configuration files or logs.
4. Tool loading policy
lazyToolLoading is enabled by default, and only the pc_control tool is registered at startup. Other tools are registered only after that tool has been called. If you want to register all tools at once, set lazyToolLoading: false.
5. Configuration for special scenarios
* Game and UWP support: For games that ignore the message queue or DirectX/UWP applications, use the hardware: true parameter to bypass UI Automation limitations.
* Forced foreground focus: If a window must be brought to the foreground, explicitly allow it by using focusFallback: 'allow'.
Environment Requirements and Notes¶
Before using the plugin, make sure the target machine and Harness environment meet the following conditions:
- Target machine:
- The target account must be a local administrator, and it must be in an interactive logon state (that is, the console or RDP session is unlocked).
Win32-OpenSSH(sshd) must be installed and running on the target machine.
- Harness environment:
- The Harness runtime environment requires Node.js version
^22.19.0 || >=24.0.0.
- The Harness runtime environment requires Node.js version
- Runtime mechanism:
- On first use, the plugin uploads a PowerShell helper script to the target machine via SFTP.
- The script runs in the target user’s real desktop session through a one-time scheduled task, avoiding Session 0 isolation issues.
- Communication is based on SFTP-backed JSON file requests/responses, avoiding console encoding issues.
Summary¶
The pureexe/dsh-windows-remote-ssh plugin provides DSH with a mature remote Windows control solution. It reuses the security model and operational logic of local automation tools while enabling cross-platform remote execution over SSH. For developers who need to control remote Windows machines through code, this is a tool that can be used directly.
- Plugin homepage: https://www.skillhub.cn/plugins/pureexe/dsh-windows-remote-ssh
- Source code repository: https://github.com/pureexe/dsh-windows-remote-ssh