--- id: parallel-ssh version: "2.16.0.post1" license: LGPL-2.1-only license_treatment: copyleft maintenance: active --- # parallel-ssh — Asynchronous parallel SSH library License: copyleft · Maintenance: active · Downloads: 206.0K/mo ## What it is and what it does parallel-ssh is an asynchronous SSH client library that wraps native C SSH implementations (libssh2 or libssh) to execute commands across many remote hosts concurrently. It uses gevent for event-loop coordination and provides both a ParallelSSHClient for multi-host operations and a single-host SSHClient with a similar API. The library is designed to scale from dozens to hundreds of thousands of concurrent connections while keeping CPU and memory overhead on the client low. The package supports command execution, file transfer via SFTP and SCP, and output streaming. It handles asynchronous result gathering through generators and provides a join() method to wait for all operations to complete. Exit codes and output become available after iteration or join, and the library includes built-in host logging utilities. The native C backend means it trades Python-only portability for significant performance gains over pure-Python SSH libraries. Use it for: - Deploy or update software across a fleet of servers by running the same command in parallel on all hosts. - Gather system information (logs, metrics, configuration) from many machines simultaneously without blocking. - Copy files to or from multiple remote hosts in parallel using SFTP or SCP. - Automate infrastructure provisioning or configuration management tasks that require SSH access to many nodes. - Monitor or troubleshoot distributed systems by executing diagnostic commands across all servers at once. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Asynchronous SSH client for running commands on hundreds or thousands of remote servers in parallel with minimal client-side overhead, using native C libraries for performance. Yes, if you need to manage SSH operations across multiple hosts at scale. The native C backend and gevent integration make it substantially faster and lighter than pure-Python alternatives. LGPL-2.1-only licensing is permissive for internal use but requires attention if you distribute derivative code. No known vulnerabilities, active maintenance, and stable API make it production-ready for infrastructure automation and multi-host operations. ## Install pip install parallel-ssh uv add parallel-ssh poetry add parallel-ssh ## Installing parallel-ssh Before you install: Low friction installation via wheel distribution. Actively maintained with recent commits and stable production status. Depends on gevent and native SSH libraries (ssh2-python or ssh-python), which are themselves mature C-based projects. License in practice: Licensed under LGPL-2.1-only (copyleft). Derivative works and modifications must be released under the same license; linking in proprietary applications requires careful review of your distribution model. Quickstart: pip install parallel-ssh from parallel_ssh.clients import ParallelSSHClient hosts = ['host1', 'host2'] client = ParallelSSHClient(hosts) output = client.run_command('uname') for host_output in output: for line in host_output.stdout: print(line) Requires SSH connectivity to target hosts and compatible SSH server configuration; gevent event loop integration is implicit. Verify before relying: - Whether ssh2-python or ssh-python is automatically selected based on environment or requires explicit configuration. - Specific performance characteristics (throughput, latency) compared to alternatives under real-world load. - Whether SFTP/SCP operations work with all SSH server implementations or have known compatibility gaps. ## Package facts - License: LGPL-2.1-only (copyleft) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 206.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags parallel ssh execution, async remote command runner, bulk ssh operations, multi-host ssh client, high-performance ssh library, gevent ssh automation, libssh2 python wrapper, infrastructure-automation, async-io, multi-host-operations [View on SkillFed](https://skillfed.io/packages/parallel-ssh) · [View on PyPI](https://pypi.org/project/parallel-ssh/)