- Notifications
You must be signed in to change notification settings - Fork75
Python bindings for libssh2 C library.
License
LGPL-2.1, LGPL-2.1 licenses found
Licenses found
ParallelSSH/ssh2-python
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Super fast SSH2 protocol library.ssh2-python provides Python bindings forlibssh2.
Binary wheel packages are provided for Linux, OSX and Windows, all Python versions. Wheel packages haveno 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 thehigh level clientsinparallel-sshbased on this library.
pip install parallel-ssh
frompssh.clientsimportSSHClienthost='localhost'cmd='uname'client=SSHClient(host)host_out=client.run_command(cmd)forlineinhost_out.stdout:print(line)exit_code=host_out.exit_code
This library provides bindings to the low-level libssh2 C-API. It isnot high level, nor easy to use. Alot of codewould need to be written to use this library that is already provided by parallel-ssh.
Useparallel-ssh unlessreally sure using a C-API is what is wanted.
At this time all of thelibssh2 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 theexamples directory.
In addition, asssh2-python is a thin wrapper oflibssh2 with Python semantics,its code examples can be ported straight over to Python with only minimal changes.
Seeexamples directory for complete examples.
Again, most developers will want to useparallel-ssh rather than thislibrary directly.
Performance of above example, compared with Paramiko.
time python examples/example_echo.pytime python examples/paramiko_comparison.py
| Output: |
real 0m0.141suser 0m0.037ssys 0m0.008s
real 0m0.592suser 0m0.351ssys 0m0.021s |
|---|
About
Python bindings for libssh2 C library.
Topics
Resources
License
LGPL-2.1, LGPL-2.1 licenses found
Licenses found
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.