Skip to main content

libssh C library bindings for Python.

Project description

Bindings for libssh C library.

License Latest Version https://circleci.com/gh/ParallelSSH/ssh-python/tree/master.svg?style=shield https://img.shields.io/pypi/wheel/ssh-python.svg https://img.shields.io/pypi/pyversions/ssh-python.svg https://ci.appveyor.com/api/projects/status/2t4bmmtjvfy5s1in/branch/master?svg=true Latest documentation

Installation

Binary wheels are provided for Linux (manylinux 2010), OSX (10.14 and 10.15 for brew Python), and Windows 64-bit (Python 3.6/3.7/3.8).

Wheels have no dependencies. For building from source, see documentation.

pip install ssh-python

Project is beta status, please report any issues.

Quick Start

from __future__ import print_function

import os
import pwd

from ssh.session import Session
from ssh import options

# Linux only
USERNAME = pwd.getpwuid(os.geteuid()).pw_name
HOST = 'localhost'

s = Session()
s.options_set(options.HOST, HOST)
s.connect()

# Authenticate with agent
s.userauth_agent(USERNAME)

chan = s.channel_new()
chan.open_session()
chan.request_exec('echo me')
size, data = chan.read()
while size > 0:
    print(data.strip())
    size, data = chan.read()
chan.close()

Output:

me

Features

The library uses Cython based native code extensions as wrappers to libssh.

  • Thread safe - GIL released as much as possible

    • libssh threading limitations apply - anything not supported in C is not supported in Python

  • Very low overhead thin wrapper

  • Object oriented

    • Memory freed automatically and safely as objects are garbage collected by Python

  • Uses Python semantics where applicable

    • channel/file handle context manager support

    • channel/file handle iterator support

  • Raises low level C errors as Python exceptions

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ssh-python-0.7.0.post1.tar.gz (1.4 MB view details)

Uploaded Source

Built Distributions

ssh_python-0.7.0.post1-cp39-cp39-manylinux2010_x86_64.whl (6.8 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

ssh_python-0.7.0.post1-cp38-cp38-win_amd64.whl (9.3 MB view details)

Uploaded CPython 3.8 Windows x86-64

ssh_python-0.7.0.post1-cp38-cp38-manylinux2010_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

ssh_python-0.7.0.post1-cp38-cp38-macosx_10_15_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

ssh_python-0.7.0.post1-cp37-cp37m-win_amd64.whl (9.3 MB view details)

Uploaded CPython 3.7m Windows x86-64

ssh_python-0.7.0.post1-cp37-cp37m-manylinux2010_x86_64.whl (6.7 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

ssh_python-0.7.0.post1-cp37-cp37m-macosx_10_14_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

ssh_python-0.7.0.post1-cp36-cp36m-win_amd64.whl (9.3 MB view details)

Uploaded CPython 3.6m Windows x86-64

ssh_python-0.7.0.post1-cp36-cp36m-manylinux2010_x86_64.whl (6.7 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

ssh_python-0.7.0.post1-cp35-cp35m-manylinux2010_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.5m manylinux: glibc 2.12+ x86-64

ssh_python-0.7.0.post1-cp27-cp27mu-manylinux2010_x86_64.whl (6.4 MB view details)

Uploaded CPython 2.7mu manylinux: glibc 2.12+ x86-64

ssh_python-0.7.0.post1-cp27-cp27m-manylinux2010_x86_64.whl (6.4 MB view details)

Uploaded CPython 2.7m manylinux: glibc 2.12+ x86-64

File details

Details for the file ssh-python-0.7.0.post1.tar.gz.

File metadata

  • Download URL: ssh-python-0.7.0.post1.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/20.10.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/2.7.12

File hashes

Hashes for ssh-python-0.7.0.post1.tar.gz
Algorithm Hash digest
SHA256 945a6546fd5b0087f38382facb70d2d64d13cbed13a2849fbd15a00c9da9bcf1
MD5 f74a22b66602a87d73fd6183a3c980ff
BLAKE2b-256 e071b05c518a79912cf8275866861a3092b4149fb15270555d035e3ba58f30dc

See more details on using hashes here.

File details

Details for the file ssh_python-0.7.0.post1-cp39-cp39-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ssh_python-0.7.0.post1-cp39-cp39-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 6.8 MB
  • Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/20.10.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/2.7.12

File hashes

Hashes for ssh_python-0.7.0.post1-cp39-cp39-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 5e58d3695ef3b71b4eb05f60f7d8d700e113959c476e892fd9c577e89b29d647
MD5 b2e1802cebcd0297b0c841af26abb22a
BLAKE2b-256 c87e58acadc5209384f45e299b7c62cda417b37266b63c834cf1bb32dfd89b88

See more details on using hashes here.

File details

Details for the file ssh_python-0.7.0.post1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: ssh_python-0.7.0.post1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 9.3 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.6.8

File hashes

Hashes for ssh_python-0.7.0.post1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 f43784d5dcb26bd30d95fe48546f4b127b2dfde491e3cc56a55f5691381475e9
MD5 6c3b91fe2a440d08b9d027a78e9a1537
BLAKE2b-256 d81dd47cf4000c935f1d9aacd7972dd19b1a24478853c5b92764bf4c9894386c

See more details on using hashes here.

File details

Details for the file ssh_python-0.7.0.post1-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ssh_python-0.7.0.post1-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 6.9 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/20.10.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/2.7.12

File hashes

Hashes for ssh_python-0.7.0.post1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 c7d3817efca177bce75fac3c53af0e6ff6c892f034e4311f245a373a0afe353e
MD5 d61314a5c09509f9ffc2671d8c93acdb
BLAKE2b-256 67638747773614fa2323fbacbfe37b72bf2ee81f075c59213a1c4e7a6189e20a

See more details on using hashes here.

File details

Details for the file ssh_python-0.7.0.post1-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: ssh_python-0.7.0.post1-cp38-cp38-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.8, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.4

File hashes

Hashes for ssh_python-0.7.0.post1-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 e2aca2326fed21573611ff5c2d8dbf3ce5c335273b9d2714e346039ec9bc1480
MD5 1f66b426e03e5f737ba5de797b6de36f
BLAKE2b-256 d196163700137819a72d0a76d0c5bdedea01df8cef544a12e48b5e04cac1912c

See more details on using hashes here.

File details

Details for the file ssh_python-0.7.0.post1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: ssh_python-0.7.0.post1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 9.3 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.6.8

File hashes

Hashes for ssh_python-0.7.0.post1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 fbb4f105c30a9eed92cc6208fa05ae83f2e52a58d0981824104546849bbc01a1
MD5 01874f7b84e72de585dfa0c071d21bbe
BLAKE2b-256 1d684c2226702abfeea1388ada65d56f16ebea5af62661fc83aac74091143012

See more details on using hashes here.

File details

Details for the file ssh_python-0.7.0.post1-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ssh_python-0.7.0.post1-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 6.7 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/20.10.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/2.7.12

File hashes

Hashes for ssh_python-0.7.0.post1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 a8948d0bc7ae2aad4f57420285f838b0223256d4bdb5ad646b03fcb5c5f3044a
MD5 204bcb70032ccb341a69aeba145c95d7
BLAKE2b-256 ece60cbd4693b5fb68e0008f2d1bcf12292f09031223e424f3e147cd7943c897

See more details on using hashes here.

File details

Details for the file ssh_python-0.7.0.post1-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: ssh_python-0.7.0.post1-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.4

File hashes

Hashes for ssh_python-0.7.0.post1-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 4a5ed336ffa26a48d937f4d892249a6af5220669a7d461cb74627c8982740542
MD5 904723fe65ae8c45bb5cae70c740ed49
BLAKE2b-256 5269e8af90843651c61fa1d568a06004b882e34ea96cdcf6f7be9bb7896bb924

See more details on using hashes here.

File details

Details for the file ssh_python-0.7.0.post1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: ssh_python-0.7.0.post1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 9.3 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.6.8

File hashes

Hashes for ssh_python-0.7.0.post1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 d06f9b7a64937a24ce9edc21fc9ab4496d3799012ca4a5c13ff53e48fde30150
MD5 6556cfb0d8c92743fc55d1ee7c98374d
BLAKE2b-256 5df6bc32efc34b301229e3c30bc2badc8c626e67944dfd7243851f4612720331

See more details on using hashes here.

File details

Details for the file ssh_python-0.7.0.post1-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ssh_python-0.7.0.post1-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 6.7 MB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/20.10.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/2.7.12

File hashes

Hashes for ssh_python-0.7.0.post1-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 c995e63953a535bd47f1700ee983506e0facdb2bbd165c022ab95bfc79eb9932
MD5 b1f741a6cc47f3027e636b192e7ecdf5
BLAKE2b-256 18f2974154552e28f904669065a29cf4d87697a11bc36a4cfb3e0a5613243934

See more details on using hashes here.

File details

Details for the file ssh_python-0.7.0.post1-cp35-cp35m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ssh_python-0.7.0.post1-cp35-cp35m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 6.6 MB
  • Tags: CPython 3.5m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/20.10.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/2.7.12

File hashes

Hashes for ssh_python-0.7.0.post1-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 428cc3e30a320efa1ff1896b4963c1c129921afa2b11683d85d0625742390b47
MD5 6b8b2a03425984ddfbbdf6bee4b46e08
BLAKE2b-256 a3ce4b815c84b366dee9aa22265a48f4d216ff7dce22d8ac6c9c90cdc9582153

See more details on using hashes here.

File details

Details for the file ssh_python-0.7.0.post1-cp27-cp27mu-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ssh_python-0.7.0.post1-cp27-cp27mu-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 6.4 MB
  • Tags: CPython 2.7mu, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/20.10.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/2.7.12

File hashes

Hashes for ssh_python-0.7.0.post1-cp27-cp27mu-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 698b2b06c8bb95525a1b0871fa8e09ec9424b2983bb5dd3a5d3eeefd2e173f28
MD5 fac2f75ebd180f2f3688f6b22863912f
BLAKE2b-256 dc4c4276731bdf31695caa28862249c321ec5fbfe9398326c90da55355e182cc

See more details on using hashes here.

File details

Details for the file ssh_python-0.7.0.post1-cp27-cp27m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ssh_python-0.7.0.post1-cp27-cp27m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 6.4 MB
  • Tags: CPython 2.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/20.10.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/2.7.12

File hashes

Hashes for ssh_python-0.7.0.post1-cp27-cp27m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 0647530dd220304d9787cfbe1806348f073bb77fc20635b2fd8247c36fa1cb69
MD5 3548f673aff4e3a21a498bb0217b6f85
BLAKE2b-256 cd70bb9f9164c4724b1dc261be9ace343c69db75c57417e4fe2a5ef7af88427c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page