sshclient-promises is a lightweight ssh/scp library for node using Promises.
sshclient-promises doesn't support interactivity, so you need to set up your remote server to allow login without a password
(Google: 'ssh login without a password').
Installation
npm install node-sshclient-promises
Preflight
//some.js'use strict';var SSHClient = ;const SSH = SSHClientSSH;const SCP = SSHClientSCP;
Examples
ssh
var ssh = hostname: 'server' user: 'user' port: 22; //Simple Promisessh; //Chaining Commandsssh;
scp
var scp = hostname: 'server' user: 'user'; //Uploadscp; //Download Singlescp; //Download Queuescp;
Credits
Based off the original callback based node-sshclient
module found here.