ssh-client-wrapper 3.3.1 → 3.3.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.
Files changed (2) hide show
  1. package/lib/sshExec.js +3 -0
  2. package/package.json +1 -1
package/lib/sshExec.js CHANGED
@@ -101,6 +101,8 @@ export async function canConnect(hostInfo, timeout) {
101
101
  debug("canConnect called");
102
102
  sanityCheck(hostInfo);
103
103
 
104
+ //login must be tried again even if the host has been verified before (the credentials may have changed)
105
+ delete hostInfo._connectionVerified;
104
106
  await connect(hostInfo, timeout);
105
107
  await disconnect(hostInfo);
106
108
  //if connection fail, Error is throwed.
@@ -180,6 +182,7 @@ async function verifyConnection(hostInfo, timeout) {
180
182
  } else if (/Operation|Connection timed out/.test(output)) {
181
183
  err.message = "Operation timed out";
182
184
  } else {
185
+ e.output = output;
183
186
  throw e;
184
187
  }
185
188
  throw err;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ssh-client-wrapper",
3
- "version": "3.3.1",
3
+ "version": "3.3.2",
4
4
  "description": "wrapper library for open ssh client and rsync",
5
5
  "keywords": [
6
6
  "ssh",