Introduction

When building agents in the DSH ecosystem, remote command execution is a common requirement. If you can only retrieve output within a conversation and lack visual support for interactive terminals, debugging multi-host scenarios can become cumbersome. The dsh-ssh-terminal plugin provides a visual SSH terminal panel in the DSH sidebar and also offers a standardized SSH toolset for agents.

Plugin Overview

Name: dsh-ssh-terminal
Maintainer: sunzhyang1616-ui
Purpose: SSH remote terminal: connect to remote hosts in the DSH sidebar and inspect commands and output step by step.

Core Features

  1. Better-sidebar “SSH Terminal” Panel
    The dsh-better-sidebar plugin must be installed (version >= 0.12.0). After installation, the Better-sidebar menu will show an “SSH Terminal” option. The panel includes a connection form, command input, and a live command → output transcript (with timestamps, and colors that follow the DSH theme).

  2. Parallel Multi-Connection Support
    Each call to ssh_connect creates an independent SSH process, output buffer, and command queue. The left side of the sidebar lists the active connections, and clicking one switches to the corresponding transcript view.

  3. Agent Toolset
    This plugin provides a set of agent tools that do not depend on Better-sidebar. Available tools include:
    * ssh_connect: establish a connection and return a connectionId.
    * ssh_exec: execute a command.
    * ssh_disconnect: disconnect a connection.
    * ssh_status: view connection status.
    * ssh_list: list all connections.

  4. Persistent Audit Records
    Operation records are saved to ~/.dsh/ssh-terminal-history.json on the local machine and are retained across restarts. The “Clear Current” button in the top-right corner of the panel only clears the records for the currently selected connection.

Installation and Enablement

Install using the official plugin command:

dsh plugin add github:sunzhyang1616-ui/dsh-ssh-terminal

After installation, perform a hard browser refresh (Cmd/Ctrl+Shift+R) to load the client-side changes. This plugin depends on either the DSH Web or DSH Desktop environment.

Typical Usage

When using the agent tools, be mindful of connection lifecycle management:

  1. Establish a Connection
    Call ssh_connect. You must save the returned connectionId, because subsequent operations rely on this ID.

  2. Execute Commands
    Use the connectionId obtained in the previous step to call ssh_exec.

  3. Parallelism and Queuing
    * Parallel: commands with different connectionId values can be executed at the same time.
    * Queued: commands within the same connection are executed in call order to avoid interfering with each other when writing to the same SSH PTY.

Use Cases and Notes

  • Use cases: visualizing remote terminal output, managing multiple remote hosts, and incorporating SSH operations into agent workflows.
  • Connection state: SSH connections exist as host-level processes. After DSH restarts, connections will be disconnected, but operation records are preserved.
  • Security recommendations: passwords are used only for the current call and are not echoed or written to the transcript. It is recommended to use identity (a private key file) for authentication.

Conclusion

dsh-ssh-terminal adds visual SSH capabilities to the DSH plugin ecosystem. By combining the sidebar panel with agent tools, it enables real-time monitoring and control of remote terminals without interrupting the main conversation flow.

GitHub