Wrapper library over paramiko to allow remote execution of tasks. Supports parallel execution on multiple hosts
Project description
parallel-ssh
============
Small wrapper library over paramiko that allows for parallel execution of SSH commands on remote hosts and executing simple single host commands over SSH
.. image:: https://api.travis-ci.org/pkittenis/parallel-ssh.png?branch=master
:target: https://travis-ci.org/pkittenis/parallel-ssh
************
Installation
************
To install gevent you need the libevent-dev package installed. Instructions below are for apt-get systems, substitute with your own package manager if necessary.
::
$ sudo apt-get install libevent-dev
$ pip install parallel-ssh
************
Usage Example
************
>>> from pssh import ParallelSSHClient
>>> hosts = ['myhost1', 'myhost2']
>>> client = ParallelSSHClient(hosts)
>>> cmds = client.exec_command('ls -ltrh /tmp/aasdfasdf', sudo = True)
>>> print [client.get_stdout(cmd) for cmd in cmds]
============
Small wrapper library over paramiko that allows for parallel execution of SSH commands on remote hosts and executing simple single host commands over SSH
.. image:: https://api.travis-ci.org/pkittenis/parallel-ssh.png?branch=master
:target: https://travis-ci.org/pkittenis/parallel-ssh
************
Installation
************
To install gevent you need the libevent-dev package installed. Instructions below are for apt-get systems, substitute with your own package manager if necessary.
::
$ sudo apt-get install libevent-dev
$ pip install parallel-ssh
************
Usage Example
************
>>> from pssh import ParallelSSHClient
>>> hosts = ['myhost1', 'myhost2']
>>> client = ParallelSSHClient(hosts)
>>> cmds = client.exec_command('ls -ltrh /tmp/aasdfasdf', sudo = True)
>>> print [client.get_stdout(cmd) for cmd in cmds]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
parallel-ssh-0.1.tar.gz
(3.0 kB
view details)
File details
Details for the file parallel-ssh-0.1.tar.gz
.
File metadata
- Download URL: parallel-ssh-0.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc19674a893fa880ec3c9d29e2b3c1768e438e328f322c14bde6dab10535bc24 |
|
MD5 | 332d3d16c740883afd01d680a13493e2 |
|
BLAKE2b-256 | ca2305023e73bac7aa5abbdadfc206ff9a40eb3f6f0065070b9193aeb3332fdd |