Introduction¶
DeepSeek Harness (DSH) adopts a “everything is a plugin” design philosophy, implementing all feature extension points as plugins. When building agents that require remote operations, developers often have to implement SSH client logic themselves or rely on external tools to communicate with the DSH process. The palmfuture/dsh-ssh-plugin provides a ready-to-use SSH remote control capability, directly exposed to every session in DSH in a Host-only manner.
What It Is¶
dsh-ssh-plugin is a DeepSeek Harness Host-only plugin provided by the maintainer palmfuture. It allows agents in DSH to execute commands, copy files, and drive interactive shells on target machines via the local OpenSSH client, without the plugin itself storing credentials or modifying ~/.ssh/config.
The plugin exposes four tools to the model: ssh_hosts, ssh_exec, ssh_copy, and ssh_session. These tools rely solely on Node.js built-in modules, with no third-party runtime dependencies.
Core Features¶
ssh_hosts¶
Reads Host aliases and their configurations (HostName, User, Port, IdentityFile, ProxyJump) from ~/.ssh/config, and also lists non-hashed hostnames recorded in ~/.ssh/known_hosts. The returned names can be passed directly to other tools or concatenated into user@host format.
ssh_exec¶
Executes a single shell command in parallel on specified hosts. Supports setting the remote working directory and timeout, with a maximum of 32 hosts per invocation. Output, errors, exit status, timeout flag, and truncation flag are returned independently for each host. When timeout or truncation occurs, output is not spilled into logs; a narrower command (e.g., head, tail, grep) should be re-run instead.
ssh_copy¶
Uses scp to upload or download files/directories. Local paths are confined to the session workspace by default (confineLocalPaths: true); you can set localPathRoot or disable the restriction. Remote paths are relative to the remote user’s home directory by default. Parent directories must already exist, and timeouts may result in incomplete file transfers.
ssh_session¶
Opens an interactive shell on the target host and returns a session ID. The session can then be operated on via write, read, interrupt, close, and list. Output is subject to a buffer limit; excess data is discarded. Do not send passwords, phrases, or tokens in input, as these will be persisted to the session log.
Installation & Enablement¶
- Clone the repository:
git clone git@github.com:palmfuture/dsh-ssh-plugin.git
-
In DSH Desktop, open Plugins → Add plugin and select the cloned directory. Alternatively, use the plugin manager to install by targeting the absolute directory path.
-
Enable the SSH remote control row in the plugin list. The row is named
ssh-remoteand includes default configuration. -
Add the key for the target host (replace
host.examplein the example):
ssh-keyscan -H host.example >> ~/.ssh/known_hosts
Or simply connect once manually to let the SSH client automatically add the key. The plugin defaults to StrictHostKeyChecking=yes, which requires the target host’s key to already be in known_hosts.
Typical Usage¶
- Query available hosts:
Which SSH hosts can you reach?
- Check disk usage in parallel on multiple hosts:
Check disk usage on dell.lan and spark.lan.
- Fetch the last 50 lines of a remote log:
Show the last 50 lines of /var/log/syslog on cluster.lan.
- Open a session and run a command:
Open a shell on spark.lan, run nvidia-smi, and show the output.
- Copy a file to a remote host:
Copy build.tar.gz to /tmp on cluster.lan.
Use Cases & Cautions¶
This plugin is well-suited for scenarios where you need to remotely execute commands, transfer files, or maintain interactive sessions via SSH within DSH agents, such as multi-node cluster inspection, batch deployment, and remote debugging.
Before use, ensure the following:
- DeepSeek Harness version is 0.2.3-alpha.2 or a compatible version (engines.dsh: ^0.2.3-alpha.2).
- OpenSSH client (ssh, scp) is installed locally.
- Non-interactive authentication is used (key-based or ssh-agent); password and keyboard-interactive prompts are not supported.
- Target host keys are already present in ~/.ssh/known_hosts.
The plugin runs with the permissions of the current DSH process and does not modify system configuration files. It is recommended to review the source code and license (MIT) before installation.
Conclusion¶
dsh-ssh-plugin provides DeepSeek Harness with out-of-the-box SSH remote control capabilities. By leveraging existing SSH configurations through Host aliases, keys, and ssh-agent, it eliminates the need for redundant implementation. For more details, refer to the directory page and the GitHub repository.