1.1.1 • Published 8 years ago

run-on-ssh v1.1.1

Weekly downloads
9
License
MIT
Repository
github
Last release
8 years ago

run-on-ssh

Run a node.js script on a given ssh server

Build Status Dependency Status NPM version

Installation

npm install run-on-ssh --save

Usage

var runOnSsh = require('run-on-ssh');

var runCommand = runOnSsh({
  // see https://www.npmjs.com/package/ssh2 .connect for `remote` option.
  remote: {host, password},
  directory: __dirname + '/path/to/folder',
  nodeVersion: 'v6.4.0', // defaults to `process.version`
  // N.B. debug defaults to false if `process.env.NODE_ENV === 'production'`
  debug: false,
});
runCommand({
  env: {MY_ENV_VAR: 'foo'},  // defaults to `{}` so you don't accidentally expose your environment
  args: ['bar'], // defaults to `[]`
}).then(res => assert(res === '00017foobar\n'));

License

MIT

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago

0.0.2

8 years ago