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.5.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

ssh_python-0.5.0-cp38-cp38-win_amd64.whl (8.7 MB view details)

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

ssh_python-0.5.0-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.5.0-cp37-cp37m-win_amd64.whl (8.7 MB view details)

Uploaded CPython 3.7m Windows x86-64

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

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

ssh_python-0.5.0-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.5.0-cp36-cp36m-win_amd64.whl (8.7 MB view details)

Uploaded CPython 3.6m Windows x86-64

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

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

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

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

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

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

ssh_python-0.5.0-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.5.0.tar.gz.

File metadata

  • Download URL: ssh-python-0.5.0.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.48.2 CPython/2.7.12

File hashes

Hashes for ssh-python-0.5.0.tar.gz
Algorithm Hash digest
SHA256 91154c26808ab265147d41a011f25d1816b8c9239b1e506819b279f254a1e25a
MD5 258ec778a7ef683c73c331050fde56ff
BLAKE2b-256 0d12e3bd652e063a2c64f79e5509e915d2901d4f8e72b96519ae81d710b42b57

See more details on using hashes here.

File details

Details for the file ssh_python-0.5.0-cp39-cp39-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ssh_python-0.5.0-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.48.2 CPython/2.7.12

File hashes

Hashes for ssh_python-0.5.0-cp39-cp39-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 1a2e358562026264672baf379f96e5b9c37492296037a7ea5201a9e6188ab9fc
MD5 4a097818f175f61cb04450e6bd3229a9
BLAKE2b-256 a293d395bfd975b43125f716fad2967ba882c403d344d6c654ccd51b80161ece

See more details on using hashes here.

File details

Details for the file ssh_python-0.5.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: ssh_python-0.5.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 8.7 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/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.0

File hashes

Hashes for ssh_python-0.5.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 ceefa04165ffdee6cba12eb99735537028cedab7b04598bd0c54751881f13532
MD5 e0f5c3c1e4ba12205a25c398800e2208
BLAKE2b-256 f46672e4fee8ab08205efcfe52096344e774048b95bea527d989e4e94cfdcb83

See more details on using hashes here.

File details

Details for the file ssh_python-0.5.0-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ssh_python-0.5.0-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.48.2 CPython/2.7.12

File hashes

Hashes for ssh_python-0.5.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 40002e2fab94a9a287f7ee8792b5b81f20f8b81baaeec797534abb9c1f5f01ba
MD5 3249e678ee6d1645e03352d8a2c8be14
BLAKE2b-256 79a03acc4ba4ecc6a53cfd4efbc480f87ddab43ff4de50cea95ff5d66be4b6bd

See more details on using hashes here.

File details

Details for the file ssh_python-0.5.0-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: ssh_python-0.5.0-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.48.2 CPython/3.8.4

File hashes

Hashes for ssh_python-0.5.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 545c52512b69f753e882067fa4203e2ffbdf009426f53b88387570d411756ede
MD5 65662c3061da4f9f3a2dfcdd87e73721
BLAKE2b-256 772303c7868c0635120bb18800a32a3a36cdd02a99a0338135e2a918b2ce99f0

See more details on using hashes here.

File details

Details for the file ssh_python-0.5.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: ssh_python-0.5.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 8.7 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/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.5

File hashes

Hashes for ssh_python-0.5.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 09afc9842d98d63f453002e67403e6a8cf7a66f319b8c1e509e38356faab160c
MD5 99bb61d7890135345e3dbc328ca5824e
BLAKE2b-256 178beefa6c9964b8f22057c3db174e2590e1c4864a7dcdbe08f47681e948da32

See more details on using hashes here.

File details

Details for the file ssh_python-0.5.0-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ssh_python-0.5.0-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.48.2 CPython/2.7.12

File hashes

Hashes for ssh_python-0.5.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 88ba7128503df64fdbaa389e041ae793ad648933bcc6986bf1637b142b06cdee
MD5 4ff03e9469db54b92cab16f540f5d0f2
BLAKE2b-256 448f6f417d44986776dee78ea613ef4428e3e3340f402a12394dc3d352006751

See more details on using hashes here.

File details

Details for the file ssh_python-0.5.0-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: ssh_python-0.5.0-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.48.2 CPython/3.7.4

File hashes

Hashes for ssh_python-0.5.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 d437796d8133e49b366d140429ab2e0ee3ce22fc32a43cec78184e78474b2669
MD5 3c6155472efbf54358d7b689d84d7136
BLAKE2b-256 10c0e51f023ae7998fa6a4dcfe107d799255fd433f70361f9b7589b1f145222c

See more details on using hashes here.

File details

Details for the file ssh_python-0.5.0-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: ssh_python-0.5.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 8.7 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/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.8

File hashes

Hashes for ssh_python-0.5.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 e154dca7731ba27f733cb9cf3b188cc90e249cb38c993a30293b8d5c14a17cca
MD5 777a960a652e88041fa4abd323e934e4
BLAKE2b-256 6eaa5b3cc63c34d969bf4148e1e81cbf46c101fd8e9b54e9dab476a312074c9d

See more details on using hashes here.

File details

Details for the file ssh_python-0.5.0-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ssh_python-0.5.0-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.48.2 CPython/2.7.12

File hashes

Hashes for ssh_python-0.5.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 d584bb2205851f8ec3a8f5efdb4903326f58c4ebc1353a07f9f0b8537bb1fe0a
MD5 627e5522bdafa5d8fdf44d0884b1fd7c
BLAKE2b-256 e21acbbb29c930a6ffd833d453155f1c904fd3672175a4d76f3f7671da9012d5

See more details on using hashes here.

File details

Details for the file ssh_python-0.5.0-cp35-cp35m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ssh_python-0.5.0-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.48.2 CPython/2.7.12

File hashes

Hashes for ssh_python-0.5.0-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 423745cbe8d29733d886bbd6104eae1b624fbb8f8ffc62bcc55a9f853dfa2b2e
MD5 d64615e04a53d2be61beb2d082c252b0
BLAKE2b-256 0f20dd1d734682fb54e4f52a7041156cc5c93c5254ada6dc3bc61a4c9c4be572

See more details on using hashes here.

File details

Details for the file ssh_python-0.5.0-cp27-cp27mu-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ssh_python-0.5.0-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.48.2 CPython/2.7.12

File hashes

Hashes for ssh_python-0.5.0-cp27-cp27mu-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 e363b1220d26c43dc51a8bb97500b70dd2d2f669118a2b48ebef946c5e3348c6
MD5 5b3d09685a39ef29cc583ab9853a5fc9
BLAKE2b-256 b4881a1a38493253541cfbddde4bfa580c7cf5f002d53d447eb724a598895220

See more details on using hashes here.

File details

Details for the file ssh_python-0.5.0-cp27-cp27m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ssh_python-0.5.0-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.48.2 CPython/2.7.12

File hashes

Hashes for ssh_python-0.5.0-cp27-cp27m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 bfef007e1a80217789efa10537d1aab8207972895b5daafa69bbf4c306e2a7ab
MD5 86b77a5f7f1c4c0f5e99742d2a93c218
BLAKE2b-256 7c424c686d568fb588e1209ec8f10428df5675f4fea348d34d6fee8e92aeb5cf

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