Skip to content

jbacken/node-ssh-exec

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-ssh-exec

A simple ssh2 wrapper to exec shell commands on remotes via ssh using Node.js.

Installation

npm install node-ssh-exec

Usage

var
    exec = require('node-ssh-exec');

var
    // see https://github.com/mscdex/ssh2
    config = {
        host: 'localhost',
        username: 'root',
        password: 'root'
    },
    command = 'ls -alh';

exec(config, command, function (error, response) {
    if (error) {
        throw error;
    }

    console.log(response);
});

About

A simple ssh2 wrapper to exec shell commands on remotes via ssh using Node.js.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%