@@ -18,7 +18,11 @@ var options = {
18
18
user: ' username' ,
19
19
host: ' myServer' ,
20
20
port: ' 22' ,
21
- path: ' ~'
21
+ path: ' ~' ,
22
+ ssh_options: {
23
+ StrictHostKeyChecking: " no" ,
24
+ UserKnownHostsFile: " /dev/null"
25
+ }
22
26
}
23
27
24
28
scp .send (options, function (err ) {
@@ -43,7 +47,11 @@ scp.send({
43
47
user: ' username' , // username to authenticate as on remote system
44
48
host: ' myServer' , // remote host to copy to, set up in your ~/.ssh/config
45
49
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
47
55
});
48
56
````
49
57
@@ -61,7 +69,10 @@ scp.get({
61
69
user: ' username' , // username to authenticate as on remote system
62
70
host: ' myServer' , // remote host to transfer from, set up in your ~/.ssh/config
63
71
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
+ }
65
76
});
66
77
````
67
78
0 commit comments