Preface¶
When developing with DSH / intelligent agents, a common requirement is translating natural language instructions into actions on a server: checking status, modifying configurations, viewing files, forwarding ports, and querying databases. If the Agent is only allowed to execute commands in a command line, it lacks a real terminal for verification; if only a regular terminal is used, it lacks resource management, database panels, and manual confirmation boundaries.
caoyiwei850/dsh-ssh-ops is an SSH operations plugin for DeepSeek Harness. It drives the current server from the main conversation while retaining a real interactive terminal on the right side, integrating file management, port forwarding, and database management.
What This Is¶
- Plugin name:
caoyiwei850/dsh-ssh-ops - Maintainer:
caoyiwei850 - License: MIT
- Positioning: SSH operations, file management, port forwarding, and database management plugin for DSH Web
- Installation command with locked version:
v0.2.16
Core Capabilities¶
SSH Terminal¶
The plugin opens a resizable xterm.js SSH terminal on the right side of the session. If DSH-better-sidebar is also enabled, the terminal automatically docks to the left of the sidebar.
The SSH connection uses keepalive, and after an unexpected disconnect, it automatically reconnects with exponential backoff. Host key verification (TOFU) supports three modes: accept-new, verify, and off.
File Management¶
File capabilities in the SSH panel are based on SFTP:
- Browse server directory tree
- Upload
- Download
- Create new directories
- Delete
- Rename
Port Forwarding¶
Supports local forwarding and remote forwarding, with real-time viewing and stopping of tunnels in the interface.
Database Management¶
Supports connecting to MySQL / PostgreSQL / Redis / MongoDB, executing queries or commands, and viewing result tables.
db_query enforces lexically enforced read-only queries, only allowing SELECT/SHOW/DESCRIBE/EXPLAIN/pure-query WITH, while rejecting write verbs, SELECT INTO, FOR UPDATE lock reads, and data-modifying CTEs.
High-risk SQL (DROP DATABASE/SCHEMA/TABLE, TRUNCATE, SHUTDOWN) is automatically blocked and returns a copyable card for manual execution.
Server Resources and Credentials¶
Manage any number of servers and groups in Settings → Plugins → SSH Resources.
Passwords, PEM private keys, and private key passphrases are stored in DSH’s official local credential vault; browser storage, Agent context, tool results, and resource lists do not read or display secrets.
Agent Tools¶
The plugin provides 30 Agent tools covering SSH, SFTP, port forwarding, batch execution, and databases.
Security Boundaries¶
DSH’s own permission mechanism remains effective. The plugin additionally blocks Agent tools from executing obviously irreversible or destructive operations, such as deleting files, dropping databases, formatting disks, terraform destroy, kubectl delete, docker prune, forced Git cleanup, and reboot/shutdown.
High-risk commands require the operator to click the red “Execute” button before they are sent to the server, and they are no longer pre-filled in the terminal command line.
Before outputting to the model, private keys, Bearer Tokens, common passwords/API Keys, and database connection passphrases are masked.
Installation and Enablement¶
Install from GitHub:
dsh plugin --profile web add github:caoyiwei850/dsh-ssh-ops#v0.2.16
Restart DSH Web after installation:
dsh web
Then open any session, click the SSH tab at the top, and use the right-side panel to connect to a server.
Typical Usage¶
-
Open
Settings → Plugins → SSH Resources, create a new group or server resource; PEM / .key files can be imported directly. -
In the main conversation, simply say “check server memory usage” or “configure Nginx SSL certificate”.
-
When a database is needed, have the Agent call
db_connect(or create a new connection yourself in the “Database” tab), then query/execute in the conversation. -
In the main conversation, say “batch execute
“, and the Agent creates a batch task; confirm selections in the right-side SSH panel for concurrent execution. -
If a command or SQL hits high-risk rules, the plugin blocks it and returns a copyable card for manual execution by the operator.
Applicable Scenarios and Notes¶
Suitable for developers who need to complete server operations, file management, port forwarding, and database queries within DSH conversations, while retaining a real terminal, resource management, and high-risk confirmation boundaries.
Since the plugin accesses sensitive capabilities such as SSH, files, port forwarding, and databases, it should be treated as running with the current dsh process permissions. Before installation, it is recommended to review the source code and MIT license, and confirm whether the team permits entrusting server credentials to DSH’s local credential vault.
Links¶
- GitHub: https://github.com/caoyiwei850/dsh-ssh-ops
- Directory page (plugin reference, not fully verified): https://www.skillhub.cn/plugins/caoyiwei850/dsh-ssh-ops