Skip to content

Files

Latest commit

 

History

History
88 lines (63 loc) · 2.21 KB

index.rst

File metadata and controls

88 lines (63 loc) · 2.21 KB

Parallel-SSH Documentation

License Latest Version https://circleci.com/gh/ParallelSSH/parallel-ssh/tree/master.svg?style=svg Latest documentation

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

It provides clients based on C libraries with an easy to use Python API providing native code levels of performance and stability.

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 pssh.clients import ParallelSSHClient

client = ParallelSSHClient(['localhost', 'localhost'])
output = client.run_command('uname')
for host_out in output:
    for line in host_out.stdout:
        print(line)
    exit_code = host_out.exit_code
Output:
<Uname output>
<Uname output>

Single Host Client

Single host client is also available with similar API.

from pssh.clients import SSHClient

client = SSHClient('localhost')
host_out = client.run_command('uname')
for line in host_out.stdout:
    print(line)
exit_code = host_out.exit_code
Output:
<Uname output>
.. toctree::
   :maxdepth: 2

   introduction
   installation
   quickstart
   advanced
   api
   clients
   scaling
   alternatives
   Changelog
   api_upgrade_2_0


Indices and tables