Introduction¶
When developing or performing operations and maintenance with DeepSeek Harness (DSH), it is common to need remote access to Linux hosts. DSH is natively web-based and lacks direct SSH/SFTP capabilities. To address this issue, the dsh-tool-ssh plugin provides remote access functionality similar to MobaXterm, supporting session management, command execution, and file transfer.
This plugin is maintained by hoshinoick811 and open-sourced under the MIT license. It integrates SSH/SFTP capabilities into the DSH web GUI, allowing users to operate remote hosts directly through a browser.
Core Features¶
The plugin mainly provides the following capabilities:
- Connection Configuration Management: Supports saving host connection information, including username, key path, and so on. Configurations are stored locally.
- Persistent Session Reuse: SSH sessions persistently run within the DSH host process and support multiplexing. Switching views or terminal tabs does not disconnect the session.
- Remote Command Execution: Executes Shell commands on remote hosts using the
ssh_exectool. - File Operations: Supports file upload, download, read, and write operations via SFTP.
- Web GUI Operation Window: Provides a graphical interface that includes a file browser and a real-time terminal based on xterm.js and the Canvas renderer.
- Interaction Optimization: Supports dragging the splitter to adjust the width of the file pane and terminal pane, and supports session persistence and streaming output playback.
Installation and Activation¶
Install the plugin by running the following command in a terminal:
dsh plugin --profile web add git+https://github.com/hoshinoick811/dsh-tool-ssh.git
After installation, restart the DSH web profile (GUI) to use it.
Typical Usage¶
After installing the plugin, you can invoke the following commands through the DSH tool list.
1. Manage Connection Configurations¶
Add a connection configuration named aliyun:
ssh_connections action=add name=aliyun host=192.0.2.1 username=root privateKeyPath=C:\keys\aliyun.pem
2. Execute Remote Commands¶
Run a system status query on the saved aliyun connection:
ssh_exec connection=aliyun command="systemctl status nginx"
3. Read and Write Remote Files¶
Read a remote configuration file:
ssh_read connection=aliyun remotePath=/etc/nginx/nginx.conf
Write content to a remote file:
ssh_write connection=aliyun remotePath=/etc/nginx/conf.d/app.conf content="server { listen 80; ... }"
4. File Transfer¶
Upload a local file to a remote server:
ssh_upload connection=aliyun localPath=./dist/index.html remotePath=/var/www/app/index.html
Download a remote log file to the local machine:
ssh_download connection=aliyun remotePath=/var/log/nginx/error.log
5. Session Management¶
Disconnect the connection named aliyun:
ssh_disconnect connection=aliyun
Applicable Scenarios and Notes¶
- Applicable Targets: Supports access to Linux hosts only (for example, Aliyun ECS). The remote host must allow port 22.
- Security Notes:
- Passwords and private key contents are stored in plaintext in the local configuration file. You are responsible for ensuring the security of the local machine.
- The plugin runs within the DSH host process and is not constrained by the agent sandbox. Be cautious when executing remote commands or connecting to hosts.
- It is recommended to use key-based authentication instead of passwords and to set appropriate local permissions for key files.
For more information and source code, refer to the plugin directory or the GitHub repository.