Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/adriano-di-giovanni/node-ssh-exec

A simple ssh2 wrapper to exec shell commands on remotes via ssh using Node.js.
https://github.com/adriano-di-giovanni/node-ssh-exec

Last synced: about 1 month ago
JSON representation

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

Awesome Lists containing this project

README

        

# 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

```javascript
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);
});
```