Bindings for libssh2 C library
Project description
Super fast SSH2 protocol library. ssh2-python provides Python bindings for libssh2.
Installation
Binary wheel packages are provided for Linux, OSX and Windows, all Python versions. Wheel packages have no dependencies.
pip may need to be updated to be able to install binary wheel packages - pip install -U pip.
pip install ssh2-python
For from source installation instructions, including building against system provided libssh2, see documentation.
Who Should Use This
Most developers will want to use the high level clients in parallel-ssh based on this library.
This library provides bindings to the low-level libssh2 C-API. It is not high level, nor easy to use. A lot of code would need to be written to use this library that is already provided by parallel-ssh.
Use parallel-ssh unless really sure using a C-API is what is wanted.
API Feature Set
At this time all of the libssh2 API has been implemented up to the libssh2 version in the repository. Please report any missing implementation.
Complete example scripts for various operations can be found in the examples directory.
In addition, as ssh2-python is a thin wrapper of libssh2 with Python semantics, its code examples can be ported straight over to Python with only minimal changes.
Examples
See examples directory for complete examples.
Again, most developers will want to use parallel-ssh rather than this library directly.
Comparison with other Python SSH libraries
Performance of above example, compared with Paramiko.
time python examples/example_echo.py
time python examples/paramiko_comparison.py
- Output:
ssh2-python:
real 0m0.141s user 0m0.037s sys 0m0.008s
paramiko:
real 0m0.592s user 0m0.351s sys 0m0.021s
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for ssh2_python-1.0.0rc1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7274f22dcb18e16346ab101ac461ab295ba492ada61d56aab2b59a3c1669256 |
|
MD5 | da0016bf465c88c44061300d42b3700a |
|
BLAKE2b-256 | 3e259bc1cb0eeb48d3ca783e9d40b0cf7e5018436b166438245de846e1288b11 |
Hashes for ssh2_python-1.0.0rc1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be9fe0b85ab94dfd5d0b30cdeb6ce8e398e9ac503372f42d8f3a5b522c681f58 |
|
MD5 | 0f2bdfc0102a089a76f449f6f342b578 |
|
BLAKE2b-256 | 691e83550c6b7dc4f576caea4d1800aeda8e5e58793a0fae4ca6d0d0932c5550 |
Hashes for ssh2_python-1.0.0rc1-cp39-cp39-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ce1dc34a4355d584ec2f3be6cfa5418feab0892854a4b2d46b29b7560bb8167 |
|
MD5 | e77fc45e23a797192412315e0cb77b99 |
|
BLAKE2b-256 | 376394de443f9484aa4dc50db0644695703de53f91abaccea917b6a57604f989 |
Hashes for ssh2_python-1.0.0rc1-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76a88dc603ef106f79255ece7dcc99c71c89774d2501702e78c37cd9f35e57ca |
|
MD5 | ea596fc8a32c364e989b2beebd1b21c6 |
|
BLAKE2b-256 | 1ce9437ce67f568de4611a12738f01277bea31851094bdcf1da4f7ac2bec38a8 |
Hashes for ssh2_python-1.0.0rc1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75b70bf71735f1a20341c47843053f557f5fbf34e196ed079c95f3ae2046111d |
|
MD5 | 4887c0c186ea10c1486274d3ef86ac2c |
|
BLAKE2b-256 | 167348883d5483b498fed87f70351a41324d50b90a76aac2f612dc97860c6a32 |
Hashes for ssh2_python-1.0.0rc1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a025e126028434338ff6926b4ae5158a3e6566941aecc3a1909a603bad91e761 |
|
MD5 | df44fa7c1952da3e579247d7898d5d12 |
|
BLAKE2b-256 | a618b47c7b5afd5f451e87885bd4ae287aa385f74bf8f5f50641cc6a4f712aff |
Hashes for ssh2_python-1.0.0rc1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85ac30338ba461938cd7926a3fd9b07c1e67e266f24ee3c4cefb972df7f558ae |
|
MD5 | ab789ecc21c44d7902694bdb85fe4387 |
|
BLAKE2b-256 | 4ac5f4cdc28505e2b9e483cfc68db16981e5e5b4f34fa44d7625d76dccda3e1c |