Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/house-of-vanity/rexec
Parallel SSH executor with no deps
https://github.com/house-of-vanity/rexec
server-maintenance ssh
Last synced: about 2 months ago
JSON representation
Parallel SSH executor with no deps
- Host: GitHub
- URL: https://github.com/house-of-vanity/rexec
- Owner: house-of-vanity
- License: wtfpl
- Created: 2023-06-15T13:31:15.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-09-13T13:38:54.000Z (over 1 year ago)
- Last Synced: 2024-02-13T21:44:29.282Z (11 months ago)
- Topics: server-maintenance, ssh
- Language: Rust
- Homepage:
- Size: 180 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# rexec
**Parallel SSH executor** in Rust with static binary. It can read servers from `~/.ssh/known_hosts`or even expand servers from bash expanshion line `cassandra-[1:5].{prod,dev}.example.com`
[![Rust-static-build](https://github.com/house-of-vanity/rexec/actions/workflows/release.yml/badge.svg)](https://github.com/house-of-vanity/rexec/actions/workflows/release.yml)
---## Usage
```shell
_|_|_|_| _| _| _|_|_|_| _|_|_|
_| _|_| _| _| _| _| _|
_|_| _|_|_| _| _|_|_| _|
_| _| _| _| _| _|
_| _|_|_|_| _| _| _|_|_|_| _|_|_|
Parallel SSH executor in Rust
Usage: rexec [OPTIONS] --expression --command
Options:
-u, --username [default: ab]
-k, --known-hosts Use known_hosts to build servers list
-e, --expression Expression to build server list
-c, --command Command to execute on servers
--code Show exit code ONLY
-f, --noconfirm Don't ask for confirmation
-p, --parallel [default: 100]
-h, --help Print help
-V, --version Print version
```
---![image](https://github.com/house-of-vanity/rexec/assets/4666566/4c52915d-2bc1-46b9-9833-b0d7c0527f2d)
## Examples
```shell
$ rexec -f \
-e 'cassandra-gce-or-[1:2]' \
-u ab \
-c 'uname -r; date'
[INFO ] Using string expansion to build server list.
[INFO ] Matched hosts:
[INFO ] cassandra-gce-or-1.prod.example.com [2.22.123.79]
[INFO ] cassandra-gce-or-2.prod.example.com [2.22.123.158]
Continue on following 2 servers? y
[INFO ] Run command on 2 servers.cassandra-gce-or-1.prod.example.com
Exit code [0] / stdout 45 bytes / stderr 0 bytes
STDOUT
║ 5.15.0-1040-gcp
║ Thu Sep 7 13:44:40 UTC 2023cassandra-gce-or-2.prod.example.com
Exit code [0] / stdout 45 bytes / stderr 0 bytes
STDOUT
║ 5.15.0-1040-gcp
║ Thu Sep 7 13:44:40 UTC 2023
```