From e6ed226b41e8af8016b02a3ae5067170f91a2c02 Mon Sep 17 00:00:00 2001 From: Bradley Allen Date: Tue, 7 Jun 2016 12:08:06 +0100 Subject: [PATCH 1/2] identity file param for scp options --- scp.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scp.js b/scp.js index 9c78819..410be75 100644 --- a/scp.js +++ b/scp.js @@ -15,6 +15,7 @@ scp.send = function (options, cb) { '-r', '-P', (options.port == undefined ? '22' : options.port), + (options.identity_file == undefined ? '' : '-i ' + options.identity_file), '-o "ControlMaster no"', //callback is not fired if ssh sessions are shared options.file, (options.user == undefined ? '' : options.user+'@') + options.host + ':' + options.path, @@ -37,6 +38,7 @@ scp.get = function (options, cb) { '-r', '-P', (options.port == undefined ? '22' : options.port), + (options.identity_file == undefined ? '' : '-i ' + options.identity_file), '-o "ControlMaster no"', //callback is not fired if ssh sessions are shared (options.user == undefined ? '' : options.user+'@') + options.host + ':' + options.file, options.path From 5a00206fa89398279d3893840c238131fdc25646 Mon Sep 17 00:00:00 2001 From: Bradley Allen Date: Tue, 7 Jun 2016 12:10:33 +0100 Subject: [PATCH 2/2] readme update --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 135dfa1..53d6c3d 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ var options = { user: 'username', host: 'myServer', port: '22', + identity_file: '~/.ssh/MyKeyFlie.pem', path: '~' }