SkillAgentSearch skills...

Sftp

No nonsense sftp module for nodejs

Install / Use

/learn @kenichishibata/Sftp
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

NPM Build Status

sftp

No nonsense sftp client module for nodejs

Why?

Because most of the sftp upload functions does not work well for me

functions

upload(credentials,remoteFilePath,localFilePath)

Uploads the file

var fs = require('fs');
var sftp = require('sftp-node');

var options = {
  host: '52.69.94.92',
  port: '22',
  username: 'ken',
  privateKey: './key'
};

sftp.upload(options, '/home/ken/testfile', './testfile', function(err,res){
  if(err) console.log('err: '+err);
  else{
    console.log('res: '+res);
  }
});

That's it! 3 lines of code then it uploads your file!

No defaults! defaults sucks and makes it hard to debug

Now go and tell your boss that you are awesome!

##TODO many functions add password? add async?

View on GitHub
GitHub Stars7
CategoryDevelopment
Updated7y ago
Forks4

Languages

JavaScript

Security Score

55/100

Audited on Jan 9, 2019

No findings