Giter Club home page Giter Club logo

sshauto's Introduction

sshauto

Automate repetitive and tideous SSH tasks, send bulk commands to multiple terminals without having to log in to them individually.

Initial setup

Create your configuration file from the demo.json template and adjust settings.

If you don't want to store plaintext passwords, enter "ask" as your password to be asked during the procedure. If you want to use one password for all servers, enter "askonce" instead. The script sorts servers from top to bottom, so you can organize around "askonce" and still have passwords and "ask" trigger ahead of it.

For linux, you need to apt-get install plink. For Windows, you need the bundled plink.exe

This is what a demo config file looks like:

[
  {
    "ip": "192.168.0.1",
    "username": "root",
    "password": "admin",
    "scripts": ["scripts/nyzo_update.txt"]
  },
  {
    "ip": "192.168.0.2",
    "username": "root",
    "password": "ask",
    "scripts": ["scripts/nyzo_update.txt"]
  },
  {
    "ip": "192.168.0.3",
    "username": "root",
    "password": "askonce",
    "scripts": ["scripts/nyzo_update.txt", "bismuth_balance.txt"]
  },
  {
    "ip": "192.168.0.4",
    "username": "root",
    "password": "",
    "scripts": ["scripts/nyzo_update.txt"]
  }
]

Supports unlimited number of servers and unlimited number of script files per server. Of course, you may have as many configurations as you want since execution happens through arguments.

The script file is simply a set of commands you would normally enter in terminal:

cd nyzoVerifier
git fetch --all
git reset --hard origin/master
git pull origin master
./gradlew build
sudo supervisorctl reload

To run, you need to supply your configuration file as an argument to the script, here's the demo example:

python3.7 sshauto.py --conf configs/demo.json

Visualisation

alt text

sshauto's People

Contributors

hclivess avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.