Socket
Book a DemoInstallSign in
Socket

run-on-ssh

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

run-on-ssh

Run a node.js script on a given ssh server

latest
Source
npmnpm
Version
1.1.1
Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 05 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts