This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

pystassh

An easy to use libssh wrapper to execute commands on a remote server via SSH with Python.

Installation

Just use pip to install the package:

pip install pystassh

pystassh is working with python 3+ and pypy.

Requirements

pystassh is using libssh to work, you will have to install the library before using pystassh. Only version 0.7.3 was used during the development, but versions 0.5 and above should work fine as well with pystassh. Visit libssh’s official website for more information. libffi-dev is also required by the cffi module.

On Debian and Ubuntu:

apt-get install libssh-4 libffi-dev

On Fedora:

dnf install libssh libffi-dev

Examples

Running simple commands:

>>> from pystassh import Session
>>> with Session('remote_host.org', username='foo', password='baz') as ssh_session:
...     res = ssh_session.execute('whoami')
>>> res.stdout
'foo'

Handling errors:

>>> from pystassh import Session
>>> with Session('remote_host.org', username='foo', password='baz') as ssh_session:
...     res = ssh_session.execute('whoam')
>>> res.stderr
'bash: whoam : command not found'

Running multiple commands:

>>> from pystassh import Session
>>> with Session('remote_host.org', username='foo', password='baz') as ssh_session:
...     ssh_session.execute('echo "bar" > /tmp/foo')
...     res = ssh_session.execute('cat /tmp/foo')
>>> res.stdout
'bar'

Use a session without a with block:

>>> from pystassh import Session
>>> ssh_session = Session('remote_host.org', username='foo', password='baz')
>>> ssh_session.connect()
>>> res = ssh_session.execute('whoami')
>>> res.stdout
'foo'
>>> ssh_session.disconnect()

Documentation

The complete documentation is available at: http://pystassh.readthedocs.org/en/latest/

Release History

Release History

1.0.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pystassh-1.0.1.tar.gz (6.8 kB) Copy SHA256 Checksum SHA256 Source Aug 2, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting