Skip to content

Commit ef52a14

Browse files
author
Dan
committed
Updated documentation on passing on additional SSH library options. Resolves #85
1 parent a62c7b0 commit ef52a14

File tree

1 file changed

+45
-3
lines changed

1 file changed

+45
-3
lines changed

doc/advanced.rst

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ By default, output is encoded as ``UTF-8``. This can be configured with the ``en
245245
Contents of ``stdout`` will be `UTF-16` encoded.
246246
247247
.. note::
248-
248+
249249
Encoding must be valid `Python codec <https://docs.python.org/2.7/library/codecs.html>`_
250250
251251
Disabling use of pseudo terminal emulation
@@ -372,7 +372,7 @@ If wanting to copy a file from a single remote host and retain the original file
372372
.. code-block:: python
373373
374374
from pssh.ssh_client import SSHClient
375-
375+
376376
client = SSHClient('localhost')
377377
client.copy_remote_file('remote_filename', 'local_filename')
378378
@@ -400,7 +400,7 @@ Any type of iterator may be used as hosts list, including generator and list com
400400
401401
hosts = ['dc1.myhost1', 'dc2.myhost2']
402402
client = ParallelSSHClient((h for h in hosts if h.find('dc1')))
403-
403+
404404
:Filter:
405405
.. code-block:: python
406406
@@ -424,3 +424,45 @@ Hosts list can be modified in place. A call to ``run_command`` will create new c
424424
client.hosts = ['otherhost']
425425
print(client.run_command('exit 0'))
426426
{'otherhost': exit_code=None, <..>}
427+
428+
Additional options for underlying SSH libraries
429+
************************************************
430+
431+
Not all SSH library configuration options are used directly by ``Parallel-SSH``.
432+
433+
Additional options can be passed on to the underlying SSH libraries used via an optional keyword argument.
434+
435+
Please note that the underlying SSH libraries used are subject to change and not all features are present in all SSH libraries used. Future releases will have more than one option on which SSH library to use, depending on user requirements and preference.
436+
437+
*New in version 1.1.*
438+
439+
Paramiko (current default SSH library)
440+
---------------------------------------
441+
442+
GSS-API Authentication - aka Kerberos
443+
+++++++++++++++++++++++++++++++++++++++
444+
445+
.. code-block:: python
446+
447+
client = ParallelSSHClient(hosts)
448+
449+
client.run_command('id', gss_auth=True, gss_kex=True, gss_host='my_gss_host')
450+
451+
In this example, ``gss_auth``, ``gss_kex`` and ``gss_host`` are keyword arguments passed on to `paramiko.client.SSHClient.connect <http://paramiko-docs.readthedocs.io/en/stable/api/client.html#paramiko.client.SSHClient.connect>`_ to instruct the client to enable GSS-API authentication and key exchange with the provided GSS host.
452+
453+
.. note::
454+
455+
The GSS-API features of Paramiko require that the ``python-gssapi`` package be installed manually - it is optional and not installed by any *extras* option of Paramiko.
456+
457+
``pip install python-gssapi``
458+
459+
Compression
460+
++++++++++++
461+
462+
Any other options not directly referenced by ``run_command`` can be passed on to `paramiko.client.SSHClient.connect <http://paramiko-docs.readthedocs.io/en/stable/api/client.html#paramiko.client.SSHClient.connect>`_, for example the ``compress`` option.
463+
464+
.. code-block:: python
465+
466+
client = ParallelSSHClient(hosts)
467+
468+
client.run_command('id', compress=True)

0 commit comments

Comments
 (0)