GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - enkore/ssh-python: Bindings for libssh C library.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

59 Commits
59 Commits

Folders and files

NameName
Last commit message
Last commit date
.circleci
.circleci
 
 
ci
ci
 
 
doc
doc
 
 
libssh
libssh
 
 
ssh
ssh
 
 
tests
tests
 
 
.appveyor.yml
.appveyor.yml
 
 
.environment.yml
.environment.yml
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
.readthedocs.yml
.readthedocs.yml
 
 
.travis.yml
.travis.yml
 
 
COPYING
COPYING
 
 
Changelog.rst
Changelog.rst
 
 
LICENSE
LICENSE
 
 
MANIFEST.in
MANIFEST.in
 
 
README.rst
README.rst
 
 
_setup_libssh.py
_setup_libssh.py
 
 
requirements_dev.txt
requirements_dev.txt
 
 
setup.cfg
setup.cfg
 
 
setup.py
setup.py
 
 
versioneer.py
versioneer.py
 
 

Repository files navigation

ssh-python

Bindings for libssh C library.

License Latest Version https://circleci.com/gh/ParallelSSH/ssh-python/tree/master.svg?style=shield 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

About

Bindings for libssh C library.

parallel-ssh.org

Resources

Readme
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.