Repository navigation
DSH Remote Console 0.7.0 — file transfer & port forwarding
File transfer and port forwarding, both riding the SSH session you already logged in to. The agent can now move files and open tunnels without a second authentication and without the plugin ever seeing a password.
Added
remote_upload/remote_download: streamed over the authenticated ControlMaster socket, sha256 compared on both sides, no overwrite unlessoverwrite: true, 256 MB per file. Downloads go to a temporary file and are renamed only after the hash check, so a failed transfer cannot destroy an existing local file.remote_read_file/remote_write_file: read and write small remote text files (128 KB read default, 256 KB write cap). The content travels over stdin/exec, so it never shows up in the user's terminal; binary files are refused instead of being dumped as text.remote_forward:start/stop/listforssh -N -L 127.0.0.1:<local>:<remote_host>:<remote_port>, bound to loopback only. Tunnels are cancelled when the terminal ends,remote_closeruns, or the plugin unloads.- Approval for sensitive writes:
~/.ssh,/etc,/root,/boot, sudoers, systemd units and shell profiles go throughctx.approval; without an approval service the write fails closed. Paths containing..are rejected. - Real-sshd integration tests (
tests/sshd-harness.mjs+tests/integration-sshd.test.mjs): throwaway sshd on 127.0.0.1 covering wrapper login, master reuse, 1 MB upload/download with sha256, port forwarding, exit-code passthrough. They skip cleanly whenssh/sshdare missing. CI runs them. docs/compat.mdcompatibility matrix; README troubleshooting section (zh/en, 7 symptoms); tool table updated to 11 tools.scripts/bench.mjsSSH-channel baseline. Loopback environment (6 vCPU, OpenSSH 9.2p1): master setup ~190 ms, exec round-trip p50 ~12 ms / p95 ~13 ms, 1 MiB upload ~37 MiB/s, download ~23 MiB/s.
Changed
engines.dshtightened to>=0.2.1-rc.2 <0.3.0-0, so0.3.0-rc.*is no longer silently accepted.DSH_SSH_CONFIGnow applies to the exec, transfer and forwarding channels as well as the terminal wrapper, so a host can never resolve differently between the two.
Fixed
- Stopping a port forward under multiplexing: with
-Spointing at an existing master, thessh -N -Lclient can exit before or while the forward lives on the master (OpenSSH 9.6 even exits 1 after installing it).remote_forwarddecides success by whether the port listens and stops tunnels withssh -O cancel.
Install / update
- npm:
dsh-remote-console@0.7.0 - Plugin market index: https://cccodder.github.io/dsh-remote-console/market/index.json
- In DSH: 侧栏「插件」→ 卸载旧版 → 重新安装(第三方插件没有原地更新按钮)