Super fast SSH2 protocol library. ssh2-python
provides Python bindings for libssh2.
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.
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.
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.
See examples directory for complete examples.
Again, most developers will want to use parallel-ssh rather than this library directly.
Performance of above example, compared with Paramiko.
time python examples/example_echo.py
time python examples/paramiko_comparison.py
Output: |
real 0m0.141s user 0m0.037s sys 0m0.008s
real 0m0.592s user 0m0.351s sys 0m0.021s |
---|