1.0.3 • Published 7 years ago

ssh-utils v1.0.3

Weekly downloads
5
License
ISC
Repository
github
Last release
7 years ago

THIS IS A WORK IN PROGRESS

a nodejs module to help work with SSH

Install

npm install ssh-utils

Usage

"use strict";

var execCmd = require('ssh-utils').exec.command;
var catFile = require('ssh-utils').readFileContent;

var cnx = {
    "host": "127.0.0.1",
    "username": "bobMarley",
    "password": "ja"
};

execCmd(cnx, 'ls -l')
.then(function(result){
  console.log(result);
  return catFile(cnx,'/etc/hosts')
  .then(function(hosts){
    console.log(hosts);
  })
  .fail(function(err){
    console.log("1. error");
    console.log(err);
  });
})
.fail(function(err){
  console.log("2. error");
  console.log(err);
});
1.0.3

7 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago