Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var FTPS = require('ftps');
- var ftps = new FTPS({
- host: "******",
- username: "********",
- password: '*************',
- port: 990,
- protocol: 'sftp',
- sshKeyPath: "1.ssh"
- });
- ftps.ls().exec(function (err, res) {
- if (err || res.error)
- return console.log('Error', (err || res.error));
- console.log(res);
- });
- ftps.addFile('test.text').exec(function (err, res) {
- if (err || res.error)
- return console.log('Error on adding file:', (err || res.error));
- console.log('File added on server!');
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement