Introduction

In DeepSeek Harness (DSH), if you want the AI to directly connect via SSH during conversations, execute commands, check status, and disconnect—while also allowing a human to see the same terminal output in the Web GUI—you need a plugin that can both integrate with the model’s tools and provide a visual terminal panel.

This article introduces @jmcc-guo/dsh-ssh. It is maintained by jmcc-guo, licensed under MIT, and positioned as DSH’s SSH terminal panel + AI connection manager.

What This Is

@jmcc-guo/dsh-ssh is a DSH plugin that provides two types of capabilities:

  1. AI Connection Management: Allows DSH AI agents to create, view, execute, disconnect, and delete SSH connections through tool calls.
  2. Web GUI Terminal Panel: Provides a multi-tab SSH terminal in the DSH web interface, supporting real PTY, ANSI colors, and scrollback buffer.

Its goal is to place “model-operated SSH” and “human-viewed SSH terminal” in the same DSH environment, rather than giving the model only a command executor.

Core Features

AI Connection Lifecycle

The plugin exposes a set of SSH-related tools that the AI agent can invoke to manage connections:

ssh_connect
ssh_exec
ssh_list
ssh_status
ssh_disconnect
ssh_exec_read
ssh_exec_kill
ssh_delete

Through these tools, the AI can create connections by name or parameters, execute commands, list AI-managed connections, view connection status, read execution output, terminate executions, disconnect connections, and delete connections.

Automatic Saving and Restart Reuse

SSH connections are saved by name. After a DSH restart, executing ssh_exec on a saved connection name will re-establish the connection based on the saved configuration.

This means the same remote service can be saved as multiple independent connections in DSH, each with its own name, session state, and command queue.

Boundary Between AI and User Connections

The plugin distinguishes between two connection sources:

  1. Connections created by the AI are marked as ai.
  2. Connections created from the settings page are marked as user.

The AI cannot view or operate on user connections. ssh_list hides user connections, and tools such as ssh_exec, ssh_status, ssh_disconnect, and ssh_delete will explicitly reject user connections.

If a user wants to hand over a user connection to the AI, they must perform an explicit confirmation to complete a one-way transfer from user to ai. After the transfer, the original connection remains usable and is not disconnected first.

Keepalive, Reconnection, and Execution Mutex

The plugin provides idle keepalive for each connection. For unexpected disconnections—such as network jitter or server-side resets—it automatically reconnects; reconnection attempts have a maximum limit, and after reconnecting, the plugin notifies that the shell state has been reset.

Explicit disconnection keeps the connection in a disconnected state. None of the following operations will trigger automatic reconnection:

  1. Closing a terminal tab.
  2. Calling ssh_disconnect.
  3. Disconnecting from the settings page.

For ai-sourced connections, an execution mutex exists during AI command execution. During this period, server-side input may be discarded, the model may wait for the current shell to become quiet before executing, or a readable busy result may be returned. User connections are not affected by this mutex logic.

Multi-Tab Terminal Panel

The plugin provides an XShell/Uniterm-style multi-tab terminal panel in the DSH Web GUI. The terminal uses a real PTY and supports ANSI colors and scrollback.

The terminal panel displays command output from both the AI and user sides. Closing a tab immediately disconnects the corresponding connection; after the AI calls ssh_disconnect, the tab remains and displays a disconnected status, making it easy to reconnect later.

Settings Page and Credential Management

The SSH Connections section in the DSH settings page is used to manage connections, including:

  1. Creating SSH connections.
  2. Editing connections, including renaming.
  3. Deleting connections and their credentials.
  4. Connecting to and disconnecting from connections.

Passwords and private keys are stored in the DSH credential store using generated references. Connection records, logs, and tool results must not contain secret material. Inline keys in tool parameters are rejected, and authentication failures return sanitized, readable reasons.

The plugin supports both Chinese and English interfaces.

Installation and Activation

Before installation, the following prerequisites must be met:

  1. Node.js >= 18, using ESM.
  2. pnpm.
  3. DeepSeek Harness (DSH) installed, with the web profile enabled.

Install the plugin into the web profile:

dsh plugin --profile web add @jmcc-guo/dsh-ssh

After installation, if you modify the plugin collection or the client bundle graph, you need to restart the profile process. DSH combines the plugin collection and the client bundle graph at startup.

If you need to override plugin configuration, you can configure dsh-ssh in the profile patch. The listed configuration keys include:

- id: dsh-ssh
  config:
    heartbeatIntervalMs: ...
    reconnectMaxAttempts: ...
    outputLimitBytes: ...

These key names come from the plugin configuration description. The actual values should be set based on the remote environment, network stability, and output size requirements.

Typical Usage

Installing into DSH

dsh plugin --profile web add @jmcc-guo/dsh-ssh

Letting the AI Call SSH Tools

After installation and activation, the AI agent can call these tools during conversations:

ssh_connect
ssh_exec
ssh_list
ssh_status
ssh_disconnect
ssh_exec_read
ssh_exec_kill
ssh_delete

For example, first establish a connection, then execute a command, check status, and finally disconnect. The specific connection parameters are determined by the SSH configuration you provide; credential-related information should be managed through the DSH credential store rather than written directly into tool parameters.

Managing Connections on the Settings Page

Go to the DSH settings page and find SSH Connections.

On this page, you can:

  1. Create new SSH connections.
  2. Edit existing connections.
  3. Delete connections.
  4. Connect to a specified connection.
  5. Disconnect a specified connection.

Overriding Runtime Parameters

Override the dsh-ssh configuration keys in the profile patch, for example:

- id: dsh-ssh
  config:
    heartbeatIntervalMs: ...
    reconnectMaxAttempts: ...
    outputLimitBytes: ...

Save and restart the profile process for the configuration to take effect.

Use Cases and Considerations

Who This Is For

This plugin is suitable for users who:

  1. Use AI agents in the DSH Web GUI and want the AI to handle SSH tasks directly.
  2. Want both AI commands and manual operations to be viewable in the same terminal panel.
  3. Need to manage multiple SSH connections and distinguish between AI connections and user connections.
  4. Want to place SSH credentials in the DSH credential store rather than having them scattered in logs, records, or tool parameters.

Runtime Permissions

The plugin runs under the permissions of the current DSH process. Before installation, it is recommended to review the source code, dependencies, and license to confirm that it meets the security requirements of your environment.

Credential Security

Passwords and private keys should be stored in the DSH credential store. Secret material must not appear in connection records, logs, or tool results. Inline keys in tool parameters are rejected, and authentication failures return sanitized, readable reasons.

Reconnection Semantics

Automatic reconnection is only used for unexpected disconnections. Explicit disconnection keeps the connection disconnected. Closing a tab disconnects immediately; after the AI calls ssh_disconnect, the tab remains and displays disconnected.

Build and Dependencies

ssh2 is bundled with the plugin and does not require an additional build step. Optional native crypto bindings will not be compiled.

If you check peer dependencies with pnpm, you may see warnings about missing peers for @deepseek-ai/* packages. According to the plugin description, these warnings are considered harmless; when the plugin runs in DSH’s shared profile layout, it resolves these packages from the host environment.

Conclusion

@jmcc-guo/dsh-ssh brings the SSH terminal panel and AI connection management into DSH. It is suitable for scenarios where you want the AI to operate SSH within DSH conversations while also seeing the same terminal output in the Web GUI.

Repository address:

https://github.com/jmcc-guo/dsh-ssh

The directory page provided in the plugin listing is:

https://www.skillhub.cn/plugins/jmcc-guo/dsh-ssh

This directory page is part of the plugin listing information. Before installation, it is still recommended to refer to the actual instructions in the DSH plugin directory, repository, and source code. The DSH plugin ecosystem is maintained by the community, and directory sites are independent platforms and should not be understood as official app stores for DeepSeek or High-Flyer.