-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add additional ssh options #24
base: master
Are you sure you want to change the base?
Conversation
9a19fd9
to
45a3ab5
Compare
45a3ab5
to
25846f6
Compare
Hi, together, could someone review and merge this please? |
@ecto Would be nice to merge this |
path: '~' | ||
path: '~', | ||
ssh_options: { | ||
StrictHostKeyChecking: "no", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these examples use a different indentation from the rest of the file
result += "-o " + key + '=' + ssh_options[key] + ' ' | ||
}) | ||
return result.trim(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please match the indentation to the rest of the file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is inconsistent use of semicolons here, please use them everywhere
function buildSshOptions(options) { | ||
result = ''; | ||
var ssh_options = options.ssh_options || {} | ||
ssh_options['ControlMaster'] = 'no' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be a default but overridable
@@ -32,12 +41,14 @@ scp.send = function (options, cb) { | |||
* Grab a file from a remote host | |||
*/ | |||
scp.get = function (options, cb) { | |||
var ssh_options = ["ControlMaster=no"]; //callback is not fired if ssh sessions are shared |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is redundant given similar code in buildSshOptions
, but also doesn't work because buildSshOptions
expects ssh_options to be an object
@@ -32,12 +41,14 @@ scp.send = function (options, cb) { | |||
* Grab a file from a remote host | |||
*/ | |||
scp.get = function (options, cb) { | |||
var ssh_options = ["ControlMaster=no"]; //callback is not fired if ssh sessions are shared | |||
ssh_options = options.ssh ? ssh_options.concat(options.ssh) : ssh_options; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you make ssh_options
camelCase please? nothing else in this project is snake_case
Thanks for the review! @tb0uchnafa Do you have time to work on those? If you want I can do the fixes later today and push them to your repo |
Hi together, i added the possibility to add additional ssh options hope this fits
Cheers