<commit_before>#grunt-ssh-multi-exec [![Build Status](https://travis-ci.org/ArnoldZokas/grunt-ssh-multi-exec.png?branch=master)](https://travis-ci.org/ArnoldZokas/grunt-ssh-multi-exec)
> Execute a set of SSH commands against multiple boxes

## Getting Started
This plugin requires Grunt `0.4.x`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-ssh-multi-exec --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-ssh-multi-exec');
```

##Overview
In your project's Gruntfile, add a section named `grunt-ssh-multi-exec` to the data object passed into `grunt.initConfig()`.

```js
grunt.initConfig({
  'grunt-ssh-multi-exec': {
    your_target: {
      hosts: ['127.0.0.1:2222'],
      username: 'user',
      privateKey: '/path/to/private/key',
      commands: [
        {
          input: 'uptime',
          success: function(data) {
            // optional callback
            // 'data' contains  stdout response from the target box
          },
          error: function(err) {
            // optional callback
            // 'err' contains  stderr response from the target box
          }
        }
      ]
    },
  },
});
```
Commands execute sequentially, in the order specified.

##Examples
###Single machine, single command
```js
config: {
  hosts: ['127.0.0.1:2222'],
  username: 'user',
  privateKey: '/path/to/private/key',<commit_msg>fixed spaces<commit_after>#grunt-ssh-multi-exec [![Build Status](https://travis-ci.org/ArnoldZokas/grunt-ssh-multi-exec.png?branch=master)](https://travis-ci.org/ArnoldZokas/grunt-ssh-multi-exec)
> Execute a set of SSH commands against multiple boxes

## Getting Started
This plugin requires Grunt `0.4.x`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-ssh-multi-exec --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-ssh-multi-exec');
```

##Overview
In your project's Gruntfile, add a section named `grunt-ssh-multi-exec` to the data object passed into `grunt.initConfig()`.

```js
grunt.initConfig({
  'grunt-ssh-multi-exec': {
    your_target: {
      hosts: ['127.0.0.1:2222'],
      username: 'user',
      privateKey: '/path/to/private/key',
      commands: [
        {
          input: 'uptime',
          success: function(data) {
            // optional callback
            // 'data' contains stdout response from the target box
          },
          error: function(err) {
            // optional callback
            // 'err' contains stderr response from the target box
          }
        }
      ]
    },
  },
});
```
Commands execute sequentially, in the order specified.

##Examples
###Single machine, single command
```js
config: {
  hosts: ['127.0.0.1:2222'],
  username: 'user',
  privateKey: '/path/to/private/key',
{'fraction_non_alphanumeric': 0.13494517852122576, 'fraction_numerical': 0.012369974697779028, 'mean_word_length': 3.0616438356164384, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6085559', 'n_tokens_mistral': 1162, 'n_tokens_neox': 1089, 'n_words': 326}