# run-on-ssh

> Run a node.js script on a given ssh server

Latest version **1.1.1** (published 2016-09-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install run-on-ssh
pnpm add run-on-ssh
yarn add run-on-ssh
bun add run-on-ssh
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2016-09-05 |
| First published | 2016-08-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Forbes Lindesay |
| Maintainers | forbeslindesay |

## Links

- npm: https://www.npmjs.com/package/run-on-ssh
- Repository: https://github.com/ForbesLindesay/run-on-ssh
- Homepage: https://github.com/ForbesLindesay/run-on-ssh#readme
- Issues: https://github.com/ForbesLindesay/run-on-ssh/issues
- npm.io page: https://npm.io/package/run-on-ssh

## Dependencies (4)

- [lsr](https://npm.io/package/lsr.md) ^1.0.0
- [ssh2](https://npm.io/package/ssh2.md) ^0.5.0
- [promise](https://npm.io/package/promise.md) ^7.1.1
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.3.19

## Recent versions

- 1.1.1 (latest) — 2016-09-05
- 1.1.0 — 2016-08-26
- 1.0.0 — 2016-08-23
- 0.0.2 — 2016-08-23

## README

# run-on-ssh

Run a node.js script on a given ssh server

[![Build Status](https://img.shields.io/travis/ForbesLindesay/run-on-ssh/master.svg)](https://travis-ci.org/ForbesLindesay/run-on-ssh)
[![Dependency Status](https://img.shields.io/david/ForbesLindesay/run-on-ssh/master.svg)](http://david-dm.org/ForbesLindesay/run-on-ssh)
[![NPM version](https://img.shields.io/npm/v/run-on-ssh.svg)](https://www.npmjs.org/package/run-on-ssh)

## Installation

```
npm install run-on-ssh --save
```

## Usage

```js
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

---
_Source: https://npm.io/package/run-on-ssh · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
