ansible-pylibssh
Python bindings for libssh client specific to Ansible use case
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- 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.
- Medium install friction due to compiled C extension requiring libssh 0.9.0+ to be present on the system.
License · maintenance · safety
LGPLv2+ (copyleft) — 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.
last release 2026-03-16 (151 days) · last repo commit 2026-08-14 · 80 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 295,978 downloads/mo, #7,907 on PyPI
Alternatives
Verify before relying
pip install ansible-pylibssh
from ansible_pylibssh import Session
ssh = Session()
ssh.connect(host='example.com', user='admin')- 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.
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 on this page. Verify before relying on it.
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
ansible-pylibssh on PyPI
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.
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.
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')
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 the current Python release >=3.9 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 151 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 295,978 / month, #7,907 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 2 - Pre-AlphaLicense :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)Operating System :: MacOSOperating System :: POSIX :: LinuxProgramming Language :: CythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: SecurityTopic :: Software Development :: Libraries :: Python Modules |
Evidence: ansible_pylibssh-1.4.0-cp310-cp310-macosx_15_0_x86_64.whl; ansible_pylibssh-1.4.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; ansible_pylibssh-1.4.0-cp310-cp310-manylinux_2_27_ppc64le.manylinux_2_28_ppc64le.whl; ansible_pylibssh-1.4.0-cp310-cp310-manylinux_2_27_s390x.manylinux_2_28_s390x.whl; ansible_pylibssh-1.4.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; ansible_pylibssh-1.4.0-cp310-cp310-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl; ansible_pylibssh-1.4.0-cp311-cp311-macosx_15_0_x86_64.whl; ansible_pylibssh-1.4.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; ansible_pylibssh-1.4.0-cp311-cp311-manylinux_2_27_ppc64le.manylinux_2_28_ppc64le.whl; ansible_pylibssh-1.4.0-cp311-cp311-manylinux_2_27_s390x.manylinux_2_28_s390x.whl; ansible_pylibssh-1.4.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; ansible_pylibssh-1.4.0-cp311-cp311-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl; ansible_pylibssh-1.4.0-cp312-cp312-macosx_15_0_x86_64.whl; ansible_pylibssh-1.4.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; ansible_pylibssh-1.4.0-cp312-cp312-manylinux_2_27_ppc64le.manylinux_2_28_ppc64le.whl; ansible_pylibssh-1.4.0-cp312-cp312-manylinux_2_27_s390x.manylinux_2_28_s390x.whl; ansible_pylibssh-1.4.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; ansible_pylibssh-1.4.0-cp312-cp312-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl; ansible_pylibssh-1.4.0-cp313-cp313-macosx_15_0_x86_64.whl; ansible_pylibssh-1.4.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “libssh python bindings”
- ansible-pylibsshPython bindings to libssh that provide SSH client functionality…
- ssh-pythonPython bindings to the libssh C library for SSH client operations,…
- parallel-sshAsynchronous SSH client for running commands on hundreds or thousands…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also ssh-python · ansible · ansible-core · ansible-compat · ansible-creator · ansible-base · ansible-dev-tools · jumpssh · awxkit · pygit2