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; }