Parallel-SSH Documentation

License Latest Version https://travis-ci.org/ParallelSSH/parallel-ssh.svg?branch=master https://ci.appveyor.com/api/projects/status/github/parallelssh/ssh2-python?svg=true&branch=master https://codecov.io/gh/ParallelSSH/parallel-ssh/branch/master/graph/badge.svg https://img.shields.io/pypi/wheel/parallel-ssh.svg Latest documentation

parallel-ssh is a non-blocking parallel SSH client library.

It uses non-blocking asynchronous SSH sessions and is to date the only publicly available non-blocking SSH client library, as well as the only non-blocking parallel SSH client library available for Python.

In a nutshell

Client will attempt to use all available keys under ~/.ssh as well as any keys in an SSH agent, if one is available.

from __future__ import print_function

from pssh.clients import ParallelSSHClient

client = ParallelSSHClient(['localhost'])
output = client.run_command('whoami')
for line in output['localhost'].stdout:
    print(line)
Output:
<your username here>

Note

There is also a now deprecated paramiko based client available under pssh.clients.miko that has much the same API. It supports some features not currently supported by the native client - see feature comparison.

From version 2.x.x onwards, the clients under pssh.clients.miko will be an optional extras install.

Indices and tables