Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Python3 Remote Commands toolkit

Project Description

Python3 Remote Commands

PyStorage:Python3 Remote Commands toolkit
Copyright:Copyright (c) 2016 Bruno Costa, Kairo Araujo <>


Using PIP

Just run the PIP

$ sudo pip install pyrcmd3

From local

Download the pyrcmd3 from PIP or from Marreta Github and uncompress

$ python install


At the moment the pyrcmd3 supports commands over SSH.

SSH support

  • Attributes:

    Address:IP or Hostname to client server
    User:User used to connect using ssh
    Passwd:Password used to connect to ssh
    timeout:Timeout to Connect (Hostname is valid and has route to host), default value for timeout is 30
  • Return:

    returns:Dictionary (Array) with Return Code, Std output and Std Error
  • Exceptions:

    AuthFailure:Client to Server Problem with Authentication
    BadHostKey:Host Key does not match
    SshProtocol:Problem of SSH2 Negotiation
    TimeOut:Timeout while trying to connect to a valid address
     Timeout while trying to execute command.
    • Sample:

    Simple use:

    >>> import pyrcmd3
    >>> remote = pyrcmd3.SSH('', 'foobar', 'Password1')
    >>> remote_out = remote.execute('ls')
    >>> print remote_out
    {'return_code': 0, 'stderr': '', 'stdout': 'total 24\ndrwx------   3 kairo  users  512 Jan 30 11:31 .\ndrwx------  10 kairo  users  512 Jan 30 11:30 ..\n-rw-------   1 kairo  users    0 Jan 30 11:30 foobar.txt\ndrwx------   2 kairo  users  512 Jan 30 11:31 marretinha\n'}
    >>> print remote_out['return_code']
    >>> print remote_out['stdout']
    total 24
    drwx------   3 kairo  users  512 Jan 30 11:31 .
    drwx------  10 kairo  users  512 Jan 30 11:30 ..
    -rw-------   1 kairo  users    0 Jan 30 11:30 foobar.txt
    drwx------   2 kairo  users  512 Jan 30 11:31 marretinha

    Working with exceptions

    >>> import pyrcmd3
    >>> server=pyrcmd3.SSH('localhost', 'foo', 'i dont remember', timeout=10)
    >>> try:
    ...     server.execute('ls')
    ... except pyrcmd3.exceptions.TimeoutExecutingException as e:
    ...     print(e)
    Timeout while trying to execute command.


  1. Make the for from
  2. Change the code
  3. Test the code
    1. First check all the PEP8 recommendations and possible spells.
    2. Run tests with tox
    3. Create a for your fork and verify the tests
  4. Submit your code doing a pull request
    1. try to give us details about the code. We are newbies with Python and it will be help us.

Release History

This version
History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(4.9 kB) Copy SHA256 Hash SHA256
Source None Mar 3, 2016

Supported By

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