Advertisement
Guest User

Untitled

a guest
Jul 14th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. var FTPS = require('ftps');
  2. var ftps = new FTPS({
  3. host: "******",
  4. username: "********",
  5. password: '*************',
  6. port: 990,
  7. protocol: 'sftp',
  8. sshKeyPath: "1.ssh"
  9. });
  10. ftps.ls().exec(function (err, res) {
  11. if (err || res.error)
  12. return console.log('Error', (err || res.error));
  13. console.log(res);
  14. });
  15. ftps.addFile('test.text').exec(function (err, res) {
  16. if (err || res.error)
  17. return console.log('Error on adding file:', (err || res.error));
  18. console.log('File added on server!');
  19. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement