Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

8acker
Copy link

@8acker 8acker commented Aug 7, 2017

Hi together, i added the possibility to add additional ssh options hope this fits
Cheers

@8acker 8acker force-pushed the scp-additional-ssh-options branch from 9a19fd9 to 45a3ab5 Compare August 7, 2017 13:41
@8acker 8acker force-pushed the scp-additional-ssh-options branch from 45a3ab5 to 25846f6 Compare August 7, 2017 13:44
@8acker
Copy link
Author

8acker commented Jun 7, 2018

Hi, together, could someone review and merge this please?
The readme update are already merged but the code changes not
Cheers

@jstebenne
Copy link

@ecto Would be nice to merge this

path: '~'
path: '~',
ssh_options: {
StrictHostKeyChecking: "no",
Copy link
Owner

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();
}
Copy link
Owner

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

Copy link
Owner

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'
Copy link
Owner

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
Copy link
Owner

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;
Copy link
Owner

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

@jstebenne
Copy link

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

@jstebenne jstebenne mentioned this pull request Mar 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants