Parallel-SSH

parallel-ssh is an asynchronous parallel SSH library designed for large scale automation.

It differentiates ifself from alternatives, other libraries and higher level frameworks like Ansible or Chef in several ways:

  • Scalability - Scales to hundreds, thousands, tens of thousands hosts or more.
  • Ease of use - Running commands over any number of hosts can be achieved in as little as two lines of code.
  • Speed - Fastest Python SSH library available - see performance comparison.
  • Resource use - Uses the least resources, both CPU and memory, of any other Python SSH library.
  • And more.
pip install parallel-ssh

Github PyPi ReadTheDocs

parallel-ssh 1.6.0 release

Version 1.6.0 has been released with many additions and fixes. Get it on PyPi. Main Changes SCP send and receive support for native clients. Better exception messages showing underlying error for native clients. host parameter added to all exceptions raised by parallel clients to better support per-host exception handling. Clearer imports by moving clients to their own package. Deprecation warning for default client changing from paramiko to native client as of 2. [Read More]

parallel-ssh Clients

paramiko vs libssh2

In a previous post a comparison was shown between two SSH library options for Python, with emphasis on their performance using native threads for scaling purposes. For this post, their non-blocking performance using the gevent library will be compared as the two SSH library options available now in parallel-ssh. Post has been updated with further scaling graphs for both clients. Test Setup Test script (see appendix) consists of identical parallel-ssh code for the two available parallel clients in the library, using paramiko and libssh2 via ssh2-python respectively as the underlying SSH libraries. [Read More]

The State of Python SSH Libraries

Preface In this post a new option for Python SSH libraries, ssh2-python, shall be compared to Paramiko to demonstrate their respective performance with particular emphasis on concurrency and non-blocking requests. In looking for a Python SSH library to use in an application, not many options exist. Indeed, the only general purpose library that has, up to now, been available is Paramiko, which implements the SSH2 API in Python code. [Read More]