Executing commands using SSH concurrently on multiple hosts
Project description
concurrent-ssh
Installation
pip install concurrent-ssh
# Or from the latest GitHub version
pip install git+https://github.com/DCsunset/concurrent-ssh
Usage
Use -H
or --hosts
to specify the hosts to run the commands on:
cssh -H <host1> <host2> .... <host_n> -- <command>
# Or pass extra ssh options
cssh -o="-q -4" -H <host1> <host2> .... <host_n> -- <command>
Note that --
is necessary to separate the options and the command.
For -o/--options
to work correctly, use =
to prevent it from being parsed as another option.
Development
To set up the development environment, first clone this repo.
Then it's recommended to usevenv
:
# suppose PWD is the root dir of the repo
python -m venv venv
# activate the environment``
source venv/bin/activate
pip install -r requirements.txt
To deactivate, run deactivate
.
License
This project is licensed under AGPL-3.0. Copyright notice:
concurrent-ssh
Copyright (C) 2023 DCsunset
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
concurrent-ssh-0.1.0.tar.gz
(15.7 kB
view hashes)
Built Distribution
Close
Hashes for concurrent_ssh-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63c535df4b8bdd53939a71a62e2e6412c83740758002fa70ef907c2621e08591 |
|
MD5 | 896e8e5095d451c06f9e66d37f297ed9 |
|
BLAKE2b-256 | 44068fb5d4305c4a8800012f10620f8532f5ae03e87e6d37a55df04fb6b0ebe0 |