@@ -18,7 +18,8 @@ var options = {
18
18
user: ' username' ,
19
19
host: ' myServer' ,
20
20
port: ' 22' ,
21
- path: ' ~'
21
+ path: ' ~' ,
22
+ ssh: [" StrictHostKeyChecking=no" , " UserKnownHostsFile=/dev/null" ]
22
23
}
23
24
24
25
scp .send (options, function (err ) {
@@ -43,7 +44,8 @@ scp.send({
43
44
user: ' username' , // username to authenticate as on remote system
44
45
host: ' myServer' , // remote host to copy to, set up in your ~/.ssh/config
45
46
port: ' 22' , // remote port, optional, defaults to '22'
46
- path: ' ~' // remote path to save to (this would result in a ~/file.txt on myServer)
47
+ path: ' ~' , // remote path to save to (this would result in a ~/file.txt on myServer)
48
+ ssh: [" StrictHostKeyChecking=no" , " UserKnownHostsFile=/dev/null" ] // additional ssh options (can be an array of options or one string option)
47
49
});
48
50
````
49
51
@@ -61,7 +63,8 @@ scp.get({
61
63
user: ' username' , // username to authenticate as on remote system
62
64
host: ' myServer' , // remote host to transfer from, set up in your ~/.ssh/config
63
65
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)
66
+ path: ' ~' , // local path to save to (this would result in a ~/file.txt on the local machine)
67
+ ssh: " StrictHostKeyChecking=no"
65
68
});
66
69
````
67
70
0 commit comments