Git Product home page Git Product logo

slex's Introduction

SLEX

slex is a simple binary that allows you to run a command on multiple hosts via SSH. It is very similar to fabric except that it is written in Go so you don't have to have python installed on your system and you don't have to write a script or configuration files if you do not want to.

slex -h
NAME:
   slex - SSH commands multiplexed

USAGE:
   slex [global options] command [command options] [arguments...]

VERSION:
   1

AUTHOR:
  @crosbymichael - <[email protected]>

COMMANDS:
   help, h      Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --debug                              enable debug output for the logs
   --host '--host option --host option' SSH host address
   --user, -u 'root'                    user to execute the command as
   --identity, -i 'id_rsa'              SSH identity to use for connecting to the host
   --agent, -A                          use ssh agent forwarding for authentication, rather than identity
   --help, -h                           show help
   --version, -v                        print the version

Get the uptime for all servers

slex --host 192.168.1.3 --host 192.168.1.4 uptime
[192.168.1.3:22]  01:05:20 up  4:44,  0 users,  load average: 0.35, 0.39, 0.33
[192.168.1.4:22]  01:05:20 up  9:45,  0 users,  load average: 0.04, 0.07, 0.06

Run a docker container on all servers

slex --host 192.168.1.3 --host 192.168.1.4 docker run --rm busybox echo "hi slex"
[192.168.1.3:22] hi slex
[192.168.1.4:22] hi slex

Pipe scripts to all servers

echo "echo hi again" | slex --host 192.168.1.3 --host 192.168.1.4
[192.168.1.3:22] hi again
[192.168.1.4:22] hi again

License - MIT

slex's People

Contributors

crosbymichael avatar calavera avatar

Watchers

James Cloos avatar Gerard Dragoi avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.