Git Product home page Git Product logo

alexsnet / asyncssh Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ronf/asyncssh

0.0 1.0 0.0 1.05 MB

AsyncSSH is a Python package which provides an asynchronous client and server implementation of the SSHv2 protocol on top of the Python asyncio framework. It requires Python 3.4 or later and the PyCrypto library for some cryptographic functions.

License: Eclipse Public License 1.0

Python 100.00%

asyncssh's Introduction

AsyncSSH: Asynchronous SSH for Python

AsyncSSH is a Python package which provides an asynchronous client and server implementation of the SSHv2 protocol on top of the Python 3.4+ asyncio framework.

import asyncio, asyncssh, sys

@asyncio.coroutine
def run_client():
    with (yield from asyncssh.connect('localhost')) as conn:
        stdin, stdout, stderr = yield from conn.open_session('echo "Hello!"')
        output = yield from stdout.read()
        print(output, end='')

        status = stdout.channel.get_exit_status()
        if status:
            print('Program exited with status %d' % status, file=sys.stderr)
        else:
            print('Program exited successfully')

asyncio.get_event_loop().run_until_complete(run_client())
Check out the examples to get started!

__ http://asyncssh.readthedocs.org/en/stable/#client-examples

Features

  • Full support for SSHv2 and SFTP client and server functions
    • Shell, command, and subsystem channels
    • Environment variables, terminal type, and window size
    • Direct and forwarded TCP/IP channels
    • Local and remote TCP/IP port forwarding
    • SFTP protocol version 3 with OpenSSH extensions
  • Multiple simultaneous sessions on a single SSH connection
  • Multiple SSH connections in a single event loop
  • Byte and string based I/O with settable encoding
  • A variety of key exchange, encryption, and MAC algorithms
  • Support for gzip compression
    • Including OpenSSH variant to delay compression until after auth
  • Password, public key, and keyboard-interactive user authentication methods
  • Many types and formats of public keys and certificates
  • OpenSSH-style known_hosts file support
  • OpenSSH-style authorized_keys file support
  • Compatibility with OpenSSH "Encrypt then MAC" option for better security
  • Time and byte-count based session key renegotiation
  • Designed to be easy to extend to support new forms of key exchange, authentication, encryption, and compression algorithms

License

This package is released under the following terms:

Copyright (c) 2013-2015 by Ron Frederick <[email protected]>. All rights reserved.

This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution and is available at:

http://www.eclipse.org/legal/epl-v10.html

For more information about this license, please see the Eclipse Public License FAQ.

Prerequisites

To use asyncssh, you need the following:

  • Python 3.4 or later
  • cryptography (PyCA) 1.1 or later

Installation

Install AsyncSSH by running:

pip install asyncssh

Optional Extras

There are some optional modules you can install to enable additional functionality:

AsyncSSH defines the following optional PyPI extra packages to make it easy to install any or all of these dependencies:

bcrypt
libnacl

For example, to install all of these, you can run:

pip install 'asyncssh[bcrypt,libnacl]'

Note that you will still need to manually install the libsodium library listed above for libnacl to work correctly. Unfortunately, since libsodium is not a Python package, it cannot be directly installed using pip.

Mailing Lists

Three mailing lists are available for AsyncSSH:

asyncssh's People

Contributors

alexander-travov avatar minesworld avatar ronf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.