ssh-client-wrapper 1.5.0 → 1.5.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/index.js CHANGED
@@ -148,7 +148,7 @@ class SshClientWrapper {
148
148
  * @param {Integer} timeout - timeout in secconds
149
149
  * @returns {Promise} - Resolved with true on success, otherwise rejected with Error.
150
150
  */
151
- canConnect(timeout) {
151
+ canConnect(timeout = 60) {
152
152
  debug("canConnect called timeout=", timeout);
153
153
 
154
154
  if (!Number.isInteger(timeout) || timeout <= 0) {
package/lib/util.js CHANGED
@@ -34,6 +34,12 @@ const getSshOption = (hostInfo, withoutDestination)=>{
34
34
  if (typeof hostInfo.user === "string") {
35
35
  args.push("-l");
36
36
  args.push(hostInfo.user);
37
+ } else if (typeof hostInfo.username === "string") {
38
+ args.push("-l");
39
+ args.push(hostInfo.username);
40
+ } else if (typeof hostInfo.loginname === "string") {
41
+ args.push("-l");
42
+ args.push(hostInfo.loginname);
37
43
  }
38
44
  if (typeof hostInfo.port === "string" || typeof hostInfo.port === "number") {
39
45
  args.push("-p");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ssh-client-wrapper",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "wrapper library for open ssh client and rsync",
5
5
  "keywords": [
6
6
  "ssh",