ssh-client-wrapper 2.6.1 → 2.6.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/lib/fork.js +1 -6
- package/lib/sshExec.js +3 -1
- package/package.json +1 -1
package/lib/fork.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const debug = require("debug")("sshClientWrapper:debug:fork");
|
|
3
3
|
const debugVerbose = require("debug")("sshClientWrapper:verbose:fork");
|
|
4
|
-
const debugSendPty = require("debug")("
|
|
4
|
+
const debugSendPty = require("debug")("sshClientWrapperInsecure:fork_sendpty");
|
|
5
5
|
const { spawn } = require("node-pty");
|
|
6
6
|
|
|
7
7
|
const { rePwPrompt, rePhPrompt, reNewHostPrompt, buff2String, sendPty, watchDogTimer } = require("./util.js");
|
|
@@ -96,11 +96,6 @@ async function fork (hostInfo, cmd, args, timeout, outputCallback, retryableExit
|
|
|
96
96
|
err.retryable = true;
|
|
97
97
|
reject(err);
|
|
98
98
|
}
|
|
99
|
-
if (/muxserver_listen: link mux listener .* Bad file descriptor/.test(output)) {
|
|
100
|
-
ptyProcess.kill();
|
|
101
|
-
const err = new Error("Control socket creation failed");
|
|
102
|
-
reject(err);
|
|
103
|
-
}
|
|
104
99
|
});
|
|
105
100
|
}
|
|
106
101
|
|
package/lib/sshExec.js
CHANGED
|
@@ -3,7 +3,7 @@ const crypto = require("crypto");
|
|
|
3
3
|
const { setTimeout: setTimeoutPromise } = require("timers/promises");
|
|
4
4
|
const debug = require("debug")("sshClientWrapper:debug:sshExec");
|
|
5
5
|
const debugVerbose = require("debug")("sshClientWrapper:verbose:sshExec");
|
|
6
|
-
const debugSendMasterPty = require("debug")("
|
|
6
|
+
const debugSendMasterPty = require("debug")("sshClientWrapperInsecure:sshExec_masterPty");
|
|
7
7
|
const { sendPty, sshCmd, getSshOption, sanityCheck, watchDogTimer } = require("./util.js");
|
|
8
8
|
const { fork, createMasterPty, sshLoginCallback } = require("./fork.js");
|
|
9
9
|
|
|
@@ -143,6 +143,8 @@ async function connect (hostInfo, timeout = 60) {
|
|
|
143
143
|
reject(new Error("Bad port"));
|
|
144
144
|
} else if (/Operation|Connection timed out/.test(output)) {
|
|
145
145
|
reject(new Error("Operation timed out"));
|
|
146
|
+
} else if (/muxserver_listen: link mux listener .* Bad file descriptor/.test(output)) {
|
|
147
|
+
reject(new Error("Control socket creation failed"));
|
|
146
148
|
}
|
|
147
149
|
});
|
|
148
150
|
hostInfo.masterPty.onData((data) => {
|