Fork from node-sftp-deploy, you can use it by prompting the password.
npm i node-sftp-deploy2 -D
var sftp = require('node-sftp-deploy2');
sftp({
"host": "10.10.10.10",
"port": "20",
"user": "user",
"remotePath": "",
"sourcePath": "./"
}, function(){
//Success Callback
});
//Support Promise
sftp(sftpConfig).then(function(){
//Success Callback
});