@@ -18,7 +18,11 @@ var options = {
1818 user: ' username' ,
1919 host: ' myServer' ,
2020 port: ' 22' ,
21- path: ' ~'
21+ path: ' ~' ,
22+ ssh_options: {
23+ StrictHostKeyChecking: " no" ,
24+ UserKnownHostsFile: " /dev/null"
25+ }
2226}
2327
2428scp .send (options, function (err ) {
@@ -43,7 +47,11 @@ scp.send({
4347 user: ' username' , // username to authenticate as on remote system
4448 host: ' myServer' , // remote host to copy to, set up in your ~/.ssh/config
4549 port: ' 22' , // remote port, optional, defaults to '22'
46- path: ' ~' // remote path to save to (this would result in a ~/file.txt on myServer)
50+ path: ' ~' , // remote path to save to (this would result in a ~/file.txt on myServer)
51+ ssh_options: {
52+ StrictHostKeyChecking: " no" ,
53+ UserKnownHostsFile: " /dev/null"
54+ } // additional ssh options
4755});
4856````
4957
@@ -61,7 +69,10 @@ scp.get({
6169 user: ' username' , // username to authenticate as on remote system
6270 host: ' myServer' , // remote host to transfer from, set up in your ~/.ssh/config
6371 port: ' 22' , // remote port, optional, defaults to '22'
64- path: ' ~' // local path to save to (this would result in a ~/file.txt on the local machine)
72+ path: ' ~' , // local path to save to (this would result in a ~/file.txt on the local machine)
73+ ssh_options: {
74+ StrictHostKeyChecking: " no"
75+ }
6576});
6677````
6778
0 commit comments