diff --git a/README.md b/README.md index 135dfa1..e55b354 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,30 @@ scp.send({ }); ```` +You can also pass, `ssh options`, the ones which should be passed to scp through `-o` command line option + +The code + +````javascript +scp.send({ + file : './file.txt', + user : 'username', + host : 'myServer', + port : 22, + path : '~', + ssh_options : { + ControlMaster : 'no', + StrictHostKeyChecking : 'yes' + } +```` + +is equivalent to following command line + +```` +scp -o ControlMaster=no -o StrictHostKeyChecking=yes -P 22 username@myServer:~/file.txt ~ +```` + + ###scp.get(options, cb) Transfer a file from a remote host (in your `~/.ssh/config`) to the current computer. @@ -65,6 +89,28 @@ scp.get({ }); ```` +You can also pass, `ssh options`, the ones which should be passed to scp through `-o` command line option. + +The code + +````javascript +scp.get({ + file : '~/file.txt', + user : 'username', + host : 'myServer', + port : 22, + path : '~', + ssh_options : { + ControlMaster : 'no', + StrictHostKeyChecking : 'yes' + } +```` +is equivalent to following command line + +```` +scp -o ControlMaster=no -o StrictHostKeyChecking=yes -P 22 username@myServer:~/file.txt ~ +```` + ## license (The MIT License) diff --git a/package.json b/package.json index 40f5c2e..1d23c23 100644 --- a/package.json +++ b/package.json @@ -7,11 +7,12 @@ "Gabriel Preston ", "Joseph Silvestre ", "appr ", - "Daniel Phatthanan " + "Daniel Phatthanan ", + "Manish Gupta