@zhangfengshun/dsh-remote-ssh 2.1.0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -4
- package/lib/index.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @zhangfengshun/dsh-remote-ssh
|
|
2
2
|
|
|
3
|
+
[English](./README_EN.md) | 中文
|
|
4
|
+
|
|
3
5
|
类 **VSCode Remote-SSH** 的 **DSH** 插件:通过 SSH 连接远程超算 / 服务器,在 DSH 内置「文件」「终端」页签中直接操作远程文件和终端。
|
|
4
6
|
|
|
5
7
|
## 功能
|
|
@@ -52,10 +54,6 @@ dsh plugin --profile <name> add @zhangfengshun/dsh-remote-ssh@2.1.0
|
|
|
52
54
|
|
|
53
55
|
Shell wrapper(`~/.dsh/remote-ssh/dsh-remote-shell[.cmd]`)检测工作区 `.remote-ssh.json`,自动 `ssh -tt` 连接远程,使内置「终端」页签透明接入。
|
|
54
56
|
|
|
55
|
-
## 许可证
|
|
56
|
-
|
|
57
|
-
[MIT](./LICENSE)
|
|
58
|
-
|
|
59
57
|
## ❤️ 七夕快乐
|
|
60
58
|
|
|
61
59
|
本项目是送给 **zhangyi** 的七夕礼物。
|
|
@@ -63,3 +61,7 @@ Shell wrapper(`~/.dsh/remote-ssh/dsh-remote-shell[.cmd]`)检测工作区 `.r
|
|
|
63
61
|
愿它像连接起一台台远方的超算一样,也把我们紧紧连在一起。七夕快乐 ❤️
|
|
64
62
|
|
|
65
63
|
—— 2026 年 8 月 18 日
|
|
64
|
+
|
|
65
|
+
## 许可证
|
|
66
|
+
|
|
67
|
+
[MIT](./LICENSE)
|
package/lib/index.js
CHANGED
|
@@ -279,6 +279,9 @@ function sshArgv(p, remoteCmd, tty) {
|
|
|
279
279
|
opts.push("-o", "ConnectTimeout=15");
|
|
280
280
|
opts.push("-o", "ServerAliveInterval=30");
|
|
281
281
|
opts.push("-o", "ServerAliveCountMax=3");
|
|
282
|
+
// 插件内部连接(文件读写/工具/同步)不需要端口转发;
|
|
283
|
+
// 清除 ssh config 里的 RemoteForward/LocalForward,避免端口被占时连接直接失败。
|
|
284
|
+
opts.push("-o", "ClearAllForwardings=yes");
|
|
282
285
|
if (p.proxyJump) opts.push("-o", "ProxyJump=" + String(p.proxyJump));
|
|
283
286
|
if (p.authMethod === "key" && p.keyPath) opts.push("-i", p.keyPath);
|
|
284
287
|
const target = String(p.user || "") + "@" + String(p.host || "");
|
|
@@ -1348,7 +1351,8 @@ function apply(ctx, config) {
|
|
|
1348
1351
|
" const j = JSON.parse(fs.readFileSync(info, 'utf8'));",
|
|
1349
1352
|
" if (j.keyPath && j.keyPath !== '' && j.host && j.user) {",
|
|
1350
1353
|
" const port = j.port || 22;",
|
|
1351
|
-
"
|
|
1354
|
+
" // ExitOnForwardFailure=no:ssh config 里的 RemoteForward 端口被占时终端仍能打开",
|
|
1355
|
+
" const args = ['-tt', '-o', 'StrictHostKeyChecking=no', '-o', 'ExitOnForwardFailure=no', '-p', String(port), '-i', j.keyPath, j.user + '@' + j.host];",
|
|
1352
1356
|
" if (j.proxyJump) { args.splice(2, 0, '-J', j.proxyJump); }",
|
|
1353
1357
|
" const ssh = spawn('ssh', args, { stdio: 'inherit' });",
|
|
1354
1358
|
" ssh.on('exit', function(c) { process.exit(c == null ? 0 : c); });",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhangfengshun/dsh-remote-ssh",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "DSH web plugin: VSCode Remote-SSH-like remote development (SSH to supercomputers/servers, remote workspace, file explorer, integrated terminal), integrated with dsh-better-sidebar and DSH settings.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|