From f9f8c1d7debed25857e61e587307d80f9a1c6bd5 Mon Sep 17 00:00:00 2001 From: Colin Luo Date: Wed, 8 Mar 2017 14:17:05 +0800 Subject: [PATCH] Add privateKey Supportted. --- .gitignore | 1 + index.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 34977ee..62e9f16 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +*.sublime-* node_modules .idea \ No newline at end of file diff --git a/index.js b/index.js index 188522c..611724d 100644 --- a/index.js +++ b/index.js @@ -217,7 +217,9 @@ module.exports = function (options, callback) { username: options.username }; - if (options.password) { + if (options.privateKey) { + connection_options.privateKey = options.privateKey; + } else if (options.password) { connection_options.password = options.password; }