userkeyword argument no longer required on Windows - exception is raised if user cannot be identified.
Removed deprecated since
2.0.0functions and parameters.
copy_remote_filewith recurse enabled would not use a provided encoding for sub-directories - #284
Reconnecting to the same proxy host when proxy is configured would sometimes cause segfauls - ##304
Password authentication via
pssh.clients.sshwould not work - #276
Sending files via
sftp_putwith timeout set could timeout unexpectedly on opening remote file - #271.
Agent authentication would not work for the libssh clients under
Password authentication would be attempted if all other methods failed even when no password was provided.
Gevent minimum version was too low - #269.
Successful identity file authentication would raise error - #264.
Python 2 no longer supported.
Updated class arguments, refactor for
Closed clients with proxy host enabled would not shutdown their proxy servers.
Clients with proxy host enabled would not disconnect the proxy client on
Default identity files would not be used when private key was not specified - #222.
ParallelSSHClient(<..>, identity_auth=Falsewould not be honoured.
Added interactive shell support to single and parallel clients - see documentation.
ParallelSSHClienttimeout parameter is now also applied to starting remote commands via
HostOutput.stdinnow handles EAGAIN automatically when writing - #165.
ParallelSSHClient.hostscleans up clients of hosts no longer in host list - #220.
SSHClientwith proxy enabled could not be used without setting port - #248
Encoding would not be applied to command string on
run_commandand interactive shells, utf-8 used instead - #174.
Client output implementation Python 2 support.
read_stderrnow take buffer to read from as argument instead of channel.
HostOutputargument instead of channel.
Output for multiple commands on one host run at the same time would be lost.
SSHClientnow starts buffering output from remote host, both standard output and standard error, when a command is run.
SSHClient.read_stderrand iterating on stdout/stderr from
HostOutputnow read from the internal buffer rather than the SSH channel directly.
ParallelSSHClient.joinno longer requires
consume_outputto be set in order to get exit codes without first reading output.
ParallelSSHClient.joinwith timeout no longer consumes output by default. It is now possible to use
joinwith a timeout and capture output after
ParallelSSHClient.reset_output_generatorsis now a no-op and no longer required to be called after timeouts.
stderrare now dynamic properties.
HostOutput.read_timeoutattribute. Can be used to see what read timeout was when
run_commandwas called and to change timeout when next reading from
HostOutput.encodingattribute for encoding used when
run_commandwas called. Encoding can now be changed for when next reading output.
ParallelSSHClient.joinwith timeout no longer affects
stderrread timeout set when
LibSSH clients under
pssh.clients.sshnow allow output to be read as it becomes available without waiting for remote command to finish first.
Reading from output behaviour is now consistent across all client types - parallel and single clients under both
ParallelSSHClient.joincan now be called without arguments and defaults to last ran commands.
ParallelSSHClient.finishedcan now be called without arguments and defaults to last ran commands.
This is now possible:
output = client.run_command(<..>) client.join(output) assert output.exit_code is not None
As is this:
client.run_command(<..>, read_timeout=1) client.join(output, timeout=1) for line in output.stdout: print(line)
Output can be read after and has separate timeout from join.
New single host tunneling, SSH proxy, implementation for increased performance.
proxy_portand associated parameters - see API documentation.
Proxy configuration can now be provided via
ParallelSSHClient.connect_authfunction for connecting and authenticating to hosts in parallel.
Added certificate authentication support for the
See Upgrading to API 2.0 for examples of code that will need updating.
Removed paramiko clients and dependency.
ParallelSSHClient.run_commandnow always returns a list of
return_listargument is a no-op and may be removed.
ParallelSSHClient.get_last_outputnow always returns a list of
Removed deprecated since 1.0.0
Removed deprecated since 1.0.0 imports and modules.
Removed paramiko based
Removed paramiko based
Removed paramiko based
host_configdictionary implementation - now list of
ParallelSSHClient(timeout=<seconds>)a global timeout setting for all operations.
run_command(greenlet_timeout=<..>)argument - now uses global timeout setting.
read_timeout=<seconds>)for setting output read timeout individually - defaults to global timeout setting.
pssh.nativepackage and native code.
copy_argskeyword argument for providing per-host file name arguments like rest of
Changed exception names to end in
Exception- backwards compatible.
SSHExceptionno longer available as imports
from pssh- use
Removed now unnecessary locking around SSHClient initialisation so it can be parallelised - #219.
ParallelSSHClient.joinwith encoding would not pass on encoding when reading from output buffers - #214.
Clients could raise
Timeoutearly when timeout settings were used with many hosts.
Package architecture has changed to
pssh.config.HostConfigfor providing per-host configuration. Replaces dictionary
host_configwhich is now deprecated. See per-host configuration documentation.
scp_recvwith directory target path will now copy source file to directory keeping existing name instead of failing when recurse is off - #183.
wait_finishedtimeout is now separate from
ParallelSSHClient.joinwith timeout now has finished and unfinished commands as
Timeoutexception arguments for use by client code.
ParallelSSHClient.copy_filewith recurse enabled and absolute destination path would create empty directory in home directory of user - #197.
scp_recvwith recurse enabled would not create remote directories when copying empty local directories.
ParallelSSHClient.scp_sendwould require SFTP when recurse is off and remote destination path contains directory - #157.
ParallelSSHClient.scp_recvcould block infinitely on large - 200-300MB or more - files.
SSHClient.wait_finishedwould not apply timeout value given.
Reading from output streams with timeout via run_command(<..>, timeout=<timeout>) would raise timeout early when trying to read from a stream with no data written to it while other streams have pending data - #180.
Added ssh-python (libssh) based native client with run_command implementation.
ParallelSSHClient.joinwith timeout no longer consumes output by default to allow reading of output after timeout.
ParallelSSHClient.joinwith timeout would raise
Timeoutbefore value given when client was busy with other commands.
ssh-python client at pssh.clients.ssh.ParallelSSHClient is available for testing. Please report any issues.
from pssh.clients.ssh import ParallelSSHClient
Future releases will also enable certificate authentication for the ssh-python client.
Please migrate to one of the two native clients if have not already as paramiko is very quickly accumulating yet more bugs and the 2.0.0 release which removes it is imminent.
Users that require paramiko for any reason can pin their parallel-ssh versions to parallel-ssh<2.0.0.
ParallelSSHClient going out of scope would cause new client sessions to fail if client.join was not called prior - #200
Moved polling to gevent.select.poll to increase performance and better handle high number of sockets - #189
HostOutput.exit_codeis now a dynamic property returning either
Nonewhen exit code not ready or the exit code as reported by channel.
ParallelSSHClient.get_exit_codesis now a no-op and scheduled to be removed.
Native client exit codes are now more explicit and return
Noneif no exit code is ready. Would previously return
Removed OSX Python 3.6 and 3.7 wheels. OSX wheels for brew python, currently 3.8, on OSX 10.14 and 10.15 are provided.
Native client would fail on opening sockets with large file descriptor values - #189
return_listoptional argument to
run_commandto return list of
HostOutputobjects as output rather than dictionary - defaults to
False. List output will become default starting from
Updated native clients for new version of
Manylinux 2010 wheels.
Sockets would not be closed on client going out of scope - #175
join()would reset encoding set on
Native client SCP and SFTP uploads would not handle partial writes from waiting on socket correctly.
copy_fileSFTP upload would get stuck repeating same writes until killed when copying multi-MB files from Windows clients - #148
scp_sendwould not correctly preserve file mask of local file on the remote.
Native client tunnel, used for proxy implementation, would not handle partial writes from waiting on socket correctly.
Removed libssh2 native library dependency in favour of bundled
Changed native client forward agent default behaviour to off due to incompatibility with certain SSH server implementations.
Added keep-alive functionality to native client - defaults to
ParallelSSHClient(<..>, keepalive_seconds=<interval>)to configure interval. Set to
~/.ssh/id_ecdsadefault identity location to native client.
Native parallel client
forward_ssh_agentflag would not be applied correctly.
Native client socket timeout setting would be longer than expected - #133
Added Windows 3.7 wheels
Native client no longer requires public key file for authentication.
Native clients raise
pssh.exceptions.PKeyFileErroron object initialisation if provided private key file paths cannot be found.
Native clients expand user directory (
~/<path>) on provided private key paths.
Parallel clients raise
hostsis a string instead of list or other iterable.
Better tunneling implementation for native clients that supports multiple tunnels over single SSH connection for connecting multiple hosts through single proxy.
greenlet_timeoutsetting to native client
run_commandto pass on to getting greenlet result to allow for greenlets to timeout.
Native client raises specific exceptions on non-authentication errors connecting to host instead of generic
Native client tunneling would not work correctly - #123.
timeoutsetting was not applied to native client sockets.
Native client would have
Timeoutexceptions on timeout errors connecting to hosts.
Re-generated C code with latest Cython release.
ssh2-python>= 0.14.0 support.
Native client proxy initialisation failures were not caught by
Host would always be 127.0.0.1 when using
proxy_hoston native client - #120.
scp_recvfunctions to native clients for sending and receiving files via SCP respectively.
Refactoring - clients moved to their own sub-package -
pssh.clients- with backwards compatibility for imports from
Show underlying exception from native client library when raising
hostparameter added to all exceptions raised by parallel clients - #116
Deprecation warning for client imports.
Deprecation warning for default client changing from paramiko to native client as of
libssh2in binary wheels to latest version plus enhancements.
Adds support for ECDSA host keys for native client.
Adds support for SHA-256 host key fingerprints for native client.
Added SSH agent forwarding to native client, defaults to on as per paramiko client -
Windows wheels switched to OpenSSL back end for native client.
Windows wheels include zlib and have compression enabled for native client.
Added OSX 10.13 wheel build.
Windows native client could not connect to newer SSH servers - thanks Pavel.
Note - libssh2 changes apply to binary wheels only. For building from source, see documentation.
sudoin native client incorrectly required escaping of command.
Output generators automatically restarted on call to
joinso output can resume on any timeouts.
pssh.exceptions.Timeoutexception raising was not enabled.
ParallelSSH2Client.joinwith timeout now consumes output to ensure command completion status is accurate.
Output reading now raises
pssh.exceptions.Timeoutexception when timeout is requested and reached with command still running.
ParallelSSH2Client.joinwould always raise
Timeoutwhen output has not been consumed even if command has finished - #104.
pssh.exceptions.Timeoutexception when timeout is requested and reached with command still running.
ParallelSSH2Client.jointimeout duration was incorrectly for per-host rather than total.
SFTP read flags were not fully portable.
Binary wheels would have bad version info and require git for installation.
timeoutoptional parameter to
run_command, for reading output, on native clients.
From source builds when Cython is installed with recent versions of
Native clients proxy implementation
Native clients connection and authentication retry mechanism
Proxy/tunnelling implementation is experimental - please report any issues.
libssh2) native library based clients
retry_delaykeyword parameter to parallel clients
get_last_outputfunction for retrieving output of last executed commands
cmdsattribute to parallel clients for last executed commands
Remote path for SFTP operations was created incorrectly on Windows - #88 - thanks @moscoquera
Parallel client key error when openssh config with a host name override was used - #93
Clean up after paramiko clients
Accept Paramiko version
Allow passing on of additional keyword arguments to underlying SSH library via
Changes from 0.9x series API
ParallelSSHClient.join no longer consumes output buffers
Command output is now a dictionary of host name -> host output object with stdout and et al attributes. Host output supports dictionary-like item lookup for backwards compatibility. No code changes are needed to output use though documentation will from now on refer to the new attribute style output. Dictionary-like item access is deprecated and will be removed in future major release, like 2.x.
Made output encoding configurable via keyword argument on run_command and get_output
pssh.output.HostOutput class added to hold host output
Added copy_remote_file function for copying remote files to local ones in parallel
Deprecated since 0.70.0 ParallelSSHClient API endpoints removed
Removed setuptools >= 28.0.0 dependency for better compatibility with existing installations. Pip version dependency remains for Py 2.6 compatibility with gevent - documented on project’s readme
Documented use_pty parameter of run_command
SSHClient read_output_buffer is now public function and has gained callback capability
If using the single SSHClient directly, read_output_buffer should now be used to read output buffers - this is not needed for ParallelSSHClient
run_command now uses named positional and keyword arguments