Preface¶
The DSH plugin mechanism allows more workflows to be integrated into the local interface. For users who frequently need to edit files or execute terminal commands on remote supercomputers or servers, the common practice is to edit locally and then sync, or to use a separate SSH window. @zhangfengshun/dsh-remote-ssh offers another path: after connecting to a remote host via SSH, you can directly manipulate remote files and terminals within DSH’s built-in “Files” and “Terminal” tabs.
Plugin Positioning¶
@zhangfengshun/dsh-remote-ssh is a DSH plugin similar to VSCode Remote-SSH, maintained by ZhangFengshun and licensed under MIT. Its goal is not to sync remote files to the local machine before editing, but rather to connect to remote supercomputers or servers via SSH and directly manipulate remote files and terminals within DSH’s built-in “Files” and “Terminal” tabs.
Core Capabilities¶
Below are several verified capabilities of the plugin.
- SSH Connection: Supports key/password authentication, supports ProxyJump jump hosts, and allows one-click import from
~/.ssh/config. - Remote Files: The built-in “Files” tab can directly read and write remote files via SSH without syncing.
- Remote Terminal: The built-in “Terminal” tab can automatically detect the remote workspace and enter an SSH interactive terminal.
- Remote Workspace: Select a remote directory to create a native workspace and enter the remote environment with one click.
- Model Tools: Provides 12
remote_ssh_*tools with session-aware connection parameters that can be omitted.
Installation and Activation¶
First, confirm that the current DSH environment meets the Node engine requirement: >=20.
Then use the following command to install to a specific profile:
dsh plugin --profile <name> add @zhangfengshun/dsh-remote-ssh@2.1.7
Here, <name> refers to the target DSH profile. After installation, DSH must be restarted.
When enabling, also pay attention to the bundles order: @zhangfengshun/dsh-remote-ssh must appear after dsh-better-sidebar in the bundles list.
Typical Usage¶
The following are the basic steps from remote connection to entering a remote workspace.
- Go to Settings, open “Remote Connection,” add a connection, fill in the host, port, user, and key, then click “Test Connection” to verify.
- When adding a workspace, select “Choose Remote Directory…”, pick a connection, and browse to select the remote directory.
- Open the built-in “Files” tab, which will directly display remote files; edits and saves are written back to the remote host immediately.
- Open the built-in “Terminal” tab, and the plugin will automatically SSH to the remote host; this automatic SSH path only supports key authentication.
Model Tools¶
The plugin provides 12 remote_ssh_* model tools. When invoking these tools within a remote workspace session, connection parameters can be omitted, reducing the need to repeatedly specify connection configurations on each call.
Applicable Scenarios and Notes¶
This plugin is suitable for scenarios where you need to directly operate remote supercomputers, remote server files, and terminals within DSH, especially for users who already have SSH connection configurations and want to minimize manual local-to-remote sync steps.
Before using, note the following:
- DSH must be restarted after installation.
@zhangfengshun/dsh-remote-sshmust appear afterdsh-better-sidebarin the bundles list.- Node engine requirement is
>=20. - The built-in “Terminal” tab’s automatic SSH to the remote host only supports key authentication.
- The plugin runs with the permissions of the current dsh process; inspect the source code and license before installation.
Links¶
- GitHub: https://github.com/ZhangFengshun/dsh-remote-ssh
- Directory page: The verified facts this time do not include the directory page URL; please refer to the current DSH plugin directory entry.