1.0.15 • Published 6 years ago

mussh v1.0.15

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

MUlti SSH

For running SSH commands on multiple servers.

Usage

To run on all web servers:

mussh run -t role:web "ls -lah"

To run on a specific server:

mussh run -i app1 "ls -lah" "df -h"

To run a local script

mussh run -t role:web -s ~/scripts/test.sh

Matching

Target servers will be selected from the config file by either id(s) ot tag(s).

Specifying multipe --id <id> (or -i <id>) arguments will select the servers matching the specified ids.

Specifying multiple --tag <tag> (or -t <tag>) arguments will select only the servers that have all of the matching tags. (i.e. each tag argument filters down the number of target servers). E.g. to target all web servers in west-us you specify -t web -t west-us.

Installation

npm i -g mussh

Configuration

Config file in ~/.mussh/config.yaml

Fixed keyPath can now resolve tilde ~

auths:
  - id: default
    type: password
    username: myself
    password: super-secret
  - id: key
    type: rsa
    username: myself
    keyPath: /Users/me/.ssh/id_rsa
servers:
  - id: web1
    hostname: web1.example.com
    authid: default
    tags:
      - role:web
      - dc:us-west-2
  - id: web2
    hostname: web2.example.com
    authid: default
    tags:
      - role:web
      - dc:us-west
  - id: app1
    hostname: app1.example.com
    port: 9990
    ip: v6
    auth:
      type: password
      username: adhoc
      password: test
    tags:
      - foo:bar

Roadmap

  • SUDO_ASKPASS configuration
  • better handling of multiple interactive logins
  • output to files per host in given directory
  • tidy errors
  • pipe input script?
  • manage servers and auth from cli
  • upload/download files
1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.11

6 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago