# @zhangfengshun/dsh-remote-ssh English | [δΈ­ζ–‡](./README.md) A **DSH** plugin like **VSCode Remote-SSH**: connect to remote HPC / servers via SSH, and directly operate remote files and terminals within DSH's built-in **Files** and **Terminal** sidebar tabs. ## Features | Feature | Description | | --- | --- | | πŸ”Œ SSH Connection | Key / password auth, ProxyJump bastion, one-click import from `~/.ssh/config` | | πŸ“‚ Remote Files | Built-in **Files** tab reads/writes remote files directly via SSH β€” no sync needed | | πŸ’» Remote Terminal | Built-in **Terminal** tab auto-detects remote workspaces, opens SSH interactive shell | | 🌐 Remote Workspace | Select a remote directory to create a native workspace, one-click enter | | πŸ€– Model Tools | 12 `remote_ssh_*` tools, session-aware with auto-filled connection params | ## Installation ```bash dsh plugin --profile add @zhangfengshun/dsh-remote-ssh@2.1.0 ``` > **Restart DSH** after installation. `@zhangfengshun/dsh-remote-ssh` must come **after** `dsh-better-sidebar` in the bundles list. ## Usage 1. **Settings β†’ πŸ–₯️ Remote SSH** β†’ Add a connection (host/port/user/key) β†’ Click "Test Connection" 2. **Add Workspace** β†’ Choose "Select Remote Directory…" β†’ Pick a connection β†’ Browse and select 3. Open the built-in **Files** tab β†’ Remote files shown directly, edits save back to remote 4. Open the built-in **Terminal** tab β†’ Auto SSH to remote host (key auth only) ## Model Tools | Tool | Purpose | | --- | --- | | `remote_ssh_profiles` | List saved connections + current session's remote workspace context | | `remote_ssh_exec` | Execute remote command | | `remote_ssh_ls` | List remote directory | | `remote_ssh_cat` | Read remote file | | `remote_ssh_write` | Write remote file | | `remote_ssh_grep` | Search remote file contents | | `remote_ssh_glob` | Find remote files by glob | | `remote_ssh_mkdir` | Create remote directory | | `remote_ssh_delete` | Delete remote file/directory | | `remote_ssh_move` | Move/rename | | `remote_ssh_sync` | Sync remote to local mirror | | `remote_ssh_push` | Push local mirror back to remote | In a remote-workspace session, `profileId` and other connection params can be omitted. ## How It Works The plugin registers 4 exact routes (`/sidebar/api/fs.tree`, `fs.read`, `fs.write`, `fs.search`) that intercept better-sidebar's prefix route. When the session cwd contains `.remote-ssh.json`, requests go through SSH; otherwise local fs. The client sees local mirror paths β€” the Host transparently translates them to remote paths. A shell wrapper (`~/.dsh/remote-ssh/dsh-remote-shell[.cmd]`) detects the workspace's `.remote-ssh.json` and auto-launches `ssh -tt`, making the built-in **Terminal** tab transparently connect to remote. ## ❀️ Happy Qixi This project is a Qixi Festival gift for **zhangyi**. May it connect us as closely as it connects to distant supercomputers. Happy Qixi ❀️ β€”β€” August 18, 2026 ## License [MIT](./LICENSE)