Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

breaker

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

breaker

Host

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source
Avatar

Build Status Dependencies Status Coverage Status Published Version
npm Badge

Breaker

Breaker is a utility tool for other server management tools.

This is handy when you want to remotely execute shell command via SSH on multiple hosts. Also useful when you want to format various host files (clusterssh config, Ansible inventory, SSH config) from a single .breaker.json configuration file.

Installation

npm install -g breaker 

Usage

Create sample Breaker hosts file:

breaker init

Format hosts info into clusterssh config:

breaker -t clusterssh format

Format hosts info into Ansible inventory:

breaker -t ansible format

Format hosts info into SSH config:

breaker -t sshconfig format

Format selected hosts info into clusterssh config:

breaker -t clusterssh -l label1,label2 format

Remotely execute shell command via SSH in series:

breaker ssh <command>

remember to wrap command in quotes, e.g. "pwd; df -kh; uname -a;"

Remotely execute shell command via SSH on selected hosts in series:

breaker -l label1,label2 ssh <command>

Filter label using regular expressions

breaker -l .*dev.*,^prod,backup$ ssh <command>

Configuration

.breaker.json contains an array of host objects.

For standard SSH (current user, default port, no key), only host needs to be specified, labels are useful for filtering hosts by labels:

[
  { "host": "dev1.com", "labels": [ "dev" ] },
  { "host": "dev2.com", "labels": [ "dev" ] },
  { "host": "prod1.com", "labels": [ "prod" ] }
]

For SSH with specific key, user, and port (all optionals):

[
  { "host": "dev1.com", "labels": [ "dev" ],
    "ssh":
      [
        { "user": "user1", "port": 2222, "key": "path/to/key1" },
        { "user": "user2", "port": 2223, "key": "path/to/key2" }
      ]
    }
]

Colophon

Developer's Guide

Build reports:

Keywords

FAQs

Package last updated on 18 Aug 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc