You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,18 +77,18 @@ The new client is based on ``libssh2`` via the ``ssh2-python`` extension library
77
77
78
78
See `this post <https://parallel-ssh.org/post/parallel-ssh-libssh2>`_ for a performance comparison of the available clients.
79
79
80
-
To make use of this new client, ``ParallelSSHClient`` can be imported from ``pssh.pssh2_client`` instead. Their respective APIs are almost identical.
80
+
To make use of this new client, ``ParallelSSHClient`` can be imported from ``pssh.clients.native`` instead. Their respective APIs are almost identical.
81
81
82
-
The new client will become the default and will replace the current ``pssh.pssh_client`` in a new major version of the library - ``2.0.0`` - once remaining features have been implemented.
82
+
The new client will become the default and will replace the current ``pssh.pssh_client`` in a new major version of the library - ``2.0.0``.
83
83
84
-
The current default client will remain available as an option under a new name.
84
+
The paramiko based client will remain available under ``pssh.clients.miko``.
85
85
86
86
For example:
87
87
88
88
.. code-block:: python
89
89
90
90
from pprint import pprint
91
-
from pssh.pssh2_clientimport ParallelSSHClient
91
+
from pssh.clients.nativeimport ParallelSSHClient
92
92
93
93
hosts = ['myhost1', 'myhost2']
94
94
client = ParallelSSHClient(hosts)
@@ -187,7 +187,7 @@ To copy a local file to remote hosts in parallel:
@@ -60,13 +60,15 @@ Use of an available SSH agent can also be disabled.
60
60
Programmatic SSH Agent
61
61
-----------------------
62
62
63
+
*Paramiko client only*.
64
+
63
65
It is also possible to programmatically provide an SSH agent for the client to use, instead of a system provided one. This is useful in cases where hosts need different private keys and a system SSH agent is not available.
@@ -94,11 +96,11 @@ The new client is based on ``libssh2`` via the ``ssh2-python`` extension library
94
96
95
97
See `this post <https://parallel-ssh.org/post/parallel-ssh-libssh2>`_ for a performance comparison of the available clients.
96
98
97
-
To make use of this new client, ``ParallelSSHClient`` can be imported from ``pssh.pssh2_client`` instead. Their respective APIs are almost identical.
99
+
To make use of this new client, ``ParallelSSHClient`` can be imported from ``pssh.clients.native`` instead. Their respective APIs are almost identical.
98
100
99
101
.. code-block:: python
100
102
101
-
from pssh.pssh2_clientimport ParallelSSHClient
103
+
from pssh.clients.nativeimport ParallelSSHClient
102
104
103
105
hosts = ['my_host', 'my_other_host']
104
106
client = ParallelSSHClient(hosts)
@@ -316,7 +318,7 @@ Run with sudo
316
318
output = client.run_command(<..>, sudo=True)
317
319
client.join(output)
318
320
319
-
While not best practice and password-less `sudo` is best configured for a limited set of commands, a sudo password may be provided via the stdin channel:
321
+
While not best practice and password-less ``sudo`` is best configured for a limited set of commands, a sudo password may be provided via the stdin channel:
320
322
321
323
.. code-block:: python
322
324
@@ -350,8 +352,6 @@ Contents of ``stdout`` will be `UTF-16` encoded.
350
352
Disabling use of pseudo terminal emulation
351
353
--------------------------------------------
352
354
353
-
By default, ``parallel-ssh`` uses the user's configured shell to run commands with. As a shell is used by default, a pseudo terminal (`PTY`) is also requested by default.
354
-
355
355
For cases where use of a `PTY` is not wanted, such as having separate stdout and stderr outputs, the remote command is a daemon that needs to fork and detach itself or when use of a shell is explicitly disabled, use of PTY can also be disabled.
356
356
357
357
The following example prints to stderr with PTY disabled.
@@ -374,7 +374,7 @@ The following example prints to stderr with PTY disabled.
374
374
Combined stdout/stderr
375
375
-----------------------
376
376
377
-
With a PTY, stdout and stderr output is combined.
377
+
With a PTY on the paramiko client, stdout and stderr output is combined.
378
378
379
379
The same example as above with a PTY:
380
380
@@ -470,14 +470,14 @@ If wanting to copy a file from a single remote host and retain the original file
Copy file name to clipboardExpand all lines: doc/quickstart.rst
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,9 @@ First, make sure that ``parallel-ssh`` is `installed <installation.html>`_.
12
12
13
13
If you are seeing messages like ``This operation would block forever``, this is the cause.
14
14
15
-
Monkey patching is only done for the clients under ``pssh.pssh_client`` and ``pssh.ssh_client`` for parallel and single host clients respectively.
15
+
Monkey patching is only done for the clients under ``pssh.clients.miko``.
16
16
17
-
New native library based clients under ``pssh.pssh2_client`` and ``pssh.ssh2_client`` **do not perform monkey patching** and are an option if monkey patching is not suitable. These clients will become the default in a future major release - ``2.0.0``.
17
+
New native library based clients under ``pssh.clients.native`` **do not perform monkey patching** and are an option if monkey patching is not suitable. These clients will become the default, replacing the current ``pssh.pssh_client``, in a future major release - ``2.0.0``.
18
18
19
19
Run a command on hosts in parallel
20
20
------------------------------------
@@ -138,19 +138,19 @@ For the native client (``pssh.pssh2_client``), only private key filepath is need
138
138
139
139
.. code-block:: python
140
140
141
-
from pssh.pssh2_clientimport ParallelSSHClient
141
+
from pssh.clients.nativeimport ParallelSSHClient
142
142
143
143
client = ParallelSSHClient(hosts, pkey='my_pkey')
144
144
145
145
Paramiko Client
146
146
__________________
147
147
148
-
For the paramiko based client, the helper function :py:func:`load_private_key <pssh.utils.load_private_key>` is provided to easily load all possible key types. It takes either a file path or a file-like object.
148
+
For the paramiko based client only, the helper function :py:func:`load_private_key <pssh.utils.load_private_key>` is provided to easily load all possible key types. It takes either a file path or a file-like object.
0 commit comments