Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
70 lines (50 sloc) 2.32 KB

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 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.

.. toctree::
   :maxdepth: 2

   introduction
   installation
   quickstart
   ssh2
   advanced
   api
   Changelog

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