--- id: ansible-pylibssh version: "1.4.0" license: LGPLv2+ license_treatment: copyleft maintenance: active --- # ansible-pylibssh — Python bindings for libssh client specific to Ansible use case License: copyleft · Maintenance: active · Downloads: 296.0K/mo ## What it is and what it does ansible-pylibssh is a Python wrapper around the libssh C library, providing direct access to SSH client functionality optimized for Ansible's use case. It bridges the gap between Python and libssh by exposing session management, connection handling, and SSH operations through a Python API, allowing Ansible and other tools to perform SSH operations programmatically without shelling out to external commands. The package is a compiled C extension (Cython-based) that requires libssh 0.9.0+ to be installed on the system. Recent versions (1.4.0) integrate libssh logging into Python's standard logging system, allowing fine-grained control over SSH debug output and performance tuning. It supports Python 3.9 through 3.14 and provides prebuilt wheels for macOS and multiple Linux architectures, though custom builds require a C compiler and libssh development headers. Use it for: - Integrate SSH connectivity into Ansible automation without spawning external SSH processes. - Debug SSH connection issues by routing libssh logs through Python's logging system and setting trace levels. - Build custom SSH-based tools or orchestration scripts that need direct libssh functionality rather than subprocess wrappers. - Support Ansible on platforms where native SSH binaries are unavailable or where direct C-level SSH control is required. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Python bindings to libssh that provide SSH client functionality tailored for Ansible, enabling programmatic SSH connections and operations from Python. Yes, with conditions. Install if you are building Ansible-related tools or need direct libssh integration in Python and have libssh 0.9.0+ available on your system. The copyleft license (LGPLv2+) requires careful review in proprietary contexts. The Pre-Alpha classifier suggests API stability is not guaranteed, so pin versions carefully. No known security vulnerabilities as of the fact sheet date. ## Install pip install ansible-pylibssh uv add ansible-pylibssh poetry add ansible-pylibssh ## Installing ansible-pylibssh Before you install: Medium install friction due to compiled C extension requiring libssh 0.9.0+ to be present on the system. Wheels are available for Python 3.9–3.14 across multiple architectures (x86_64, aarch64, ppc64le, s390x, armv7l) and macOS 15.0+, reducing build burden on supported platforms. Project is actively maintained with recent releases. License in practice: Licensed under LGPLv2+, a copyleft license. Any derivative work or modification must be distributed under compatible terms; static linking or redistribution may require source disclosure. Suitable for open-source projects but requires careful review in proprietary contexts. Quickstart: pip install ansible-pylibssh from ansible_pylibssh import Session ssh = Session() ssh.connect(host='example.com', user='admin') libssh 0.9.0 or later must be installed on the system; Python 3.9+ is required. Prebuilt wheels exist for common platforms but custom builds need a C compiler and libssh development headers. Verify before relying: - Whether the package supports key-based authentication, password auth, and other standard SSH mechanisms beyond what the changelog mentions. - Performance characteristics and typical use patterns within Ansible's infrastructure. - Stability guarantees given the 'Pre-Alpha' development status classifier despite active maintenance. ## Package facts - License: LGPLv2+ (copyleft) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 296.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags libssh python bindings, ssh client library python, ansible ssh connectivity, python ssh automation, libssh wrapper python, ssh session management, ssh-client, libssh-bindings, ansible-integration [View on SkillFed](https://skillfed.io/packages/ansible-pylibssh) · [View on PyPI](https://pypi.org/project/ansible-pylibssh/)