asyncssh


Nameasyncssh JSON
Version 2.18.0 PyPI version JSON
download
home_pagehttp://asyncssh.timeheart.net
SummaryAsyncSSH: Asynchronous SSHv2 client and server library
upload_time2024-10-26 18:03:26
maintainerNone
docs_urlNone
authorRon Frederick
requires_python>=3.6
licenseEclipse Public License v2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            .. image:: https://readthedocs.org/projects/asyncssh/badge/?version=latest
    :target: https://asyncssh.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

.. image:: https://img.shields.io/pypi/v/asyncssh.svg
    :target: https://pypi.python.org/pypi/asyncssh/
    :alt: AsyncSSH PyPI Project


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.6+
asyncio framework.

.. code:: python

  import asyncio, asyncssh, sys

  async def run_client():
      async with asyncssh.connect('localhost') as conn:
          result = await conn.run('echo "Hello!"', check=True)
          print(result.stdout, end='')

  try:
      asyncio.get_event_loop().run_until_complete(run_client())
  except (OSError, asyncssh.Error) as exc:
      sys.exit('SSH connection failed: ' + str(exc))

Check out the `examples`__ to get started!

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

Features
--------

* Full support for SSHv2, SFTP, and SCP client and server functions

  * Shell, command, and subsystem channels
  * Environment variables, terminal type, and window size
  * Direct and forwarded TCP/IP channels
  * OpenSSH-compatible direct and forwarded UNIX domain socket channels
  * OpenSSH-compatible TUN/TAP channels and packet forwarding
  * Local and remote TCP/IP port forwarding
  * Local and remote UNIX domain socket forwarding
  * Dynamic TCP/IP port forwarding via SOCKS
  * X11 forwarding support on both the client and the server
  * SFTP protocol version 3 with OpenSSH extensions

    * Experimental support for SFTP versions 4-6, when requested

  * SCP protocol support, including third-party remote to remote copies

* 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

  * Including post-quantum kex algorithms ML-KEM and SNTRUP

* Support for `gzip compression`__

  * Including OpenSSH variant to delay compression until after auth

* User and host-based public key, password, and keyboard-interactive
  authentication methods

* Many types and formats of `public keys and certificates`__

  * Including OpenSSH-compatible support for U2F and FIDO2 security keys
  * Including PKCS#11 support for accessing PIV security tokens
  * Including support for X.509 certificates as defined in RFC 6187

* Support for accessing keys managed by `ssh-agent`__ on UNIX systems

  * Including agent forwarding support on both the client and the server

* Support for accessing keys managed by PuTTY's Pageant agent on Windows
* Support for accessing host keys via OpenSSH's ssh-keysign
* OpenSSH-style `known_hosts file`__ support
* OpenSSH-style `authorized_keys file`__ support
* Partial support for `OpenSSH-style configuration files`__
* 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

__ http://asyncssh.readthedocs.io/en/stable/api.html#key-exchange-algorithms
__ http://asyncssh.readthedocs.io/en/stable/api.html#encryption-algorithms
__ http://asyncssh.readthedocs.io/en/stable/api.html#mac-algorithms
__ http://asyncssh.readthedocs.io/en/stable/api.html#compression-algorithms
__ http://asyncssh.readthedocs.io/en/stable/api.html#public-key-support
__ http://asyncssh.readthedocs.io/en/stable/api.html#ssh-agent-support
__ http://asyncssh.readthedocs.io/en/stable/api.html#known-hosts
__ http://asyncssh.readthedocs.io/en/stable/api.html#authorized-keys
__ http://asyncssh.readthedocs.io/en/stable/api.html#config-file-support

License
-------

This package is released under the following terms:

  Copyright (c) 2013-2024 by Ron Frederick <ronf@timeheart.net> and others.

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

    http://www.eclipse.org/legal/epl-2.0/

  This program may also be made available under the following secondary
  licenses when the conditions for such availability set forth in the
  Eclipse Public License v2.0 are satisfied:

     GNU General Public License, Version 2.0, or any later versions of
     that license

  SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later

For more information about this license, please see the `Eclipse
Public License FAQ <https://www.eclipse.org/legal/epl-2.0/faq.php>`_.

Prerequisites
-------------

To use AsyncSSH 2.0 or later, you need the following:

* Python 3.6 or later
* cryptography (PyCA) 3.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:

* Install bcrypt from https://pypi.python.org/pypi/bcrypt
  if you want support for OpenSSH private key encryption.

* Install fido2 from https://pypi.org/project/fido2 if you want support
  for key exchange and authentication with U2F/FIDO2 security keys.

* Install python-pkcs11 from https://pypi.org/project/python-pkcs11 if
  you want support for accessing PIV keys on PKCS#11 security tokens.

* Install gssapi from https://pypi.python.org/pypi/gssapi if you
  want support for GSSAPI key exchange and authentication on UNIX.

* Install liboqs from https://github.com/open-quantum-safe/liboqs
  if you want support for the OpenSSH post-quantum key exchange
  algorithms based on ML-KEM and SNTRUP.

* Install libsodium from https://github.com/jedisct1/libsodium
  and libnacl from https://pypi.python.org/pypi/libnacl if you have
  a version of OpenSSL older than 1.1.1b installed and you want
  support for Curve25519 key exchange, Ed25519 keys and certificates,
  or the Chacha20-Poly1305 cipher.

* Install libnettle from http://www.lysator.liu.se/~nisse/nettle/
  if you want support for UMAC cryptographic hashes.

* Install pyOpenSSL from https://pypi.python.org/pypi/pyOpenSSL
  if you want support for X.509 certificate authentication.

* Install pywin32 from https://pypi.python.org/pypi/pywin32 if you
  want support for using the Pageant agent or support for GSSAPI
  key exchange and authentication on Windows.

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

  | bcrypt
  | fido2
  | gssapi
  | libnacl
  | pkcs11
  | pyOpenSSL
  | pywin32

For example, to install bcrypt, fido2, gssapi, libnacl, pkcs11, and
pyOpenSSL on UNIX, you can run:

  ::

    pip install 'asyncssh[bcrypt,fido2,gssapi,libnacl,pkcs11,pyOpenSSL]'

To install bcrypt, fido2, libnacl, pkcs11, pyOpenSSL, and pywin32 on
Windows, you can run:

  ::

    pip install 'asyncssh[bcrypt,fido2,libnacl,pkcs11,pyOpenSSL,pywin32]'

Note that you will still need to manually install the libsodium library
listed above for libnacl to work correctly and/or libnettle for UMAC
support. Unfortunately, since liboqs, libsodium, and libnettle are not
Python packages, they cannot be directly installed using pip.

Installing the development branch
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If you would like to install the development branch of asyncssh directly
from Github, you can use the following command to do this:

  ::

      pip install git+https://github.com/ronf/asyncssh@develop

Mailing Lists
-------------

Three mailing lists are available for AsyncSSH:

* `asyncssh-announce@googlegroups.com`__: Project announcements
* `asyncssh-dev@googlegroups.com`__: Development discussions
* `asyncssh-users@googlegroups.com`__: End-user discussions

__ http://groups.google.com/d/forum/asyncssh-announce
__ http://groups.google.com/d/forum/asyncssh-dev
__ http://groups.google.com/d/forum/asyncssh-users

            

Raw data

            {
    "_id": null,
    "home_page": "http://asyncssh.timeheart.net",
    "name": "asyncssh",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Ron Frederick",
    "author_email": "ronf@timeheart.net",
    "download_url": "https://files.pythonhosted.org/packages/25/69/8ea398f5aa6ae8fa7d007feb262d83aa9304e4a6a1accf7a104b37fef97e/asyncssh-2.18.0.tar.gz",
    "platform": "Any",
    "description": ".. image:: https://readthedocs.org/projects/asyncssh/badge/?version=latest\n    :target: https://asyncssh.readthedocs.io/en/latest/?badge=latest\n    :alt: Documentation Status\n\n.. image:: https://img.shields.io/pypi/v/asyncssh.svg\n    :target: https://pypi.python.org/pypi/asyncssh/\n    :alt: AsyncSSH PyPI Project\n\n\nAsyncSSH: Asynchronous SSH for Python\n=====================================\n\nAsyncSSH is a Python package which provides an asynchronous client and\nserver implementation of the SSHv2 protocol on top of the Python 3.6+\nasyncio framework.\n\n.. code:: python\n\n  import asyncio, asyncssh, sys\n\n  async def run_client():\n      async with asyncssh.connect('localhost') as conn:\n          result = await conn.run('echo \"Hello!\"', check=True)\n          print(result.stdout, end='')\n\n  try:\n      asyncio.get_event_loop().run_until_complete(run_client())\n  except (OSError, asyncssh.Error) as exc:\n      sys.exit('SSH connection failed: ' + str(exc))\n\nCheck out the `examples`__ to get started!\n\n__ http://asyncssh.readthedocs.io/en/stable/#client-examples\n\nFeatures\n--------\n\n* Full support for SSHv2, SFTP, and SCP client and server functions\n\n  * Shell, command, and subsystem channels\n  * Environment variables, terminal type, and window size\n  * Direct and forwarded TCP/IP channels\n  * OpenSSH-compatible direct and forwarded UNIX domain socket channels\n  * OpenSSH-compatible TUN/TAP channels and packet forwarding\n  * Local and remote TCP/IP port forwarding\n  * Local and remote UNIX domain socket forwarding\n  * Dynamic TCP/IP port forwarding via SOCKS\n  * X11 forwarding support on both the client and the server\n  * SFTP protocol version 3 with OpenSSH extensions\n\n    * Experimental support for SFTP versions 4-6, when requested\n\n  * SCP protocol support, including third-party remote to remote copies\n\n* Multiple simultaneous sessions on a single SSH connection\n* Multiple SSH connections in a single event loop\n* Byte and string based I/O with settable encoding\n* A variety of `key exchange`__, `encryption`__, and `MAC`__ algorithms\n\n  * Including post-quantum kex algorithms ML-KEM and SNTRUP\n\n* Support for `gzip compression`__\n\n  * Including OpenSSH variant to delay compression until after auth\n\n* User and host-based public key, password, and keyboard-interactive\n  authentication methods\n\n* Many types and formats of `public keys and certificates`__\n\n  * Including OpenSSH-compatible support for U2F and FIDO2 security keys\n  * Including PKCS#11 support for accessing PIV security tokens\n  * Including support for X.509 certificates as defined in RFC 6187\n\n* Support for accessing keys managed by `ssh-agent`__ on UNIX systems\n\n  * Including agent forwarding support on both the client and the server\n\n* Support for accessing keys managed by PuTTY's Pageant agent on Windows\n* Support for accessing host keys via OpenSSH's ssh-keysign\n* OpenSSH-style `known_hosts file`__ support\n* OpenSSH-style `authorized_keys file`__ support\n* Partial support for `OpenSSH-style configuration files`__\n* Compatibility with OpenSSH \"Encrypt then MAC\" option for better security\n* Time and byte-count based session key renegotiation\n* Designed to be easy to extend to support new forms of key exchange,\n  authentication, encryption, and compression algorithms\n\n__ http://asyncssh.readthedocs.io/en/stable/api.html#key-exchange-algorithms\n__ http://asyncssh.readthedocs.io/en/stable/api.html#encryption-algorithms\n__ http://asyncssh.readthedocs.io/en/stable/api.html#mac-algorithms\n__ http://asyncssh.readthedocs.io/en/stable/api.html#compression-algorithms\n__ http://asyncssh.readthedocs.io/en/stable/api.html#public-key-support\n__ http://asyncssh.readthedocs.io/en/stable/api.html#ssh-agent-support\n__ http://asyncssh.readthedocs.io/en/stable/api.html#known-hosts\n__ http://asyncssh.readthedocs.io/en/stable/api.html#authorized-keys\n__ http://asyncssh.readthedocs.io/en/stable/api.html#config-file-support\n\nLicense\n-------\n\nThis package is released under the following terms:\n\n  Copyright (c) 2013-2024 by Ron Frederick <ronf@timeheart.net> and others.\n\n  This program and the accompanying materials are made available under\n  the terms of the Eclipse Public License v2.0 which accompanies this\n  distribution and is available at:\n\n    http://www.eclipse.org/legal/epl-2.0/\n\n  This program may also be made available under the following secondary\n  licenses when the conditions for such availability set forth in the\n  Eclipse Public License v2.0 are satisfied:\n\n     GNU General Public License, Version 2.0, or any later versions of\n     that license\n\n  SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later\n\nFor more information about this license, please see the `Eclipse\nPublic License FAQ <https://www.eclipse.org/legal/epl-2.0/faq.php>`_.\n\nPrerequisites\n-------------\n\nTo use AsyncSSH 2.0 or later, you need the following:\n\n* Python 3.6 or later\n* cryptography (PyCA) 3.1 or later\n\nInstallation\n------------\n\nInstall AsyncSSH by running:\n\n  ::\n\n    pip install asyncssh\n\nOptional Extras\n^^^^^^^^^^^^^^^\n\nThere are some optional modules you can install to enable additional\nfunctionality:\n\n* Install bcrypt from https://pypi.python.org/pypi/bcrypt\n  if you want support for OpenSSH private key encryption.\n\n* Install fido2 from https://pypi.org/project/fido2 if you want support\n  for key exchange and authentication with U2F/FIDO2 security keys.\n\n* Install python-pkcs11 from https://pypi.org/project/python-pkcs11 if\n  you want support for accessing PIV keys on PKCS#11 security tokens.\n\n* Install gssapi from https://pypi.python.org/pypi/gssapi if you\n  want support for GSSAPI key exchange and authentication on UNIX.\n\n* Install liboqs from https://github.com/open-quantum-safe/liboqs\n  if you want support for the OpenSSH post-quantum key exchange\n  algorithms based on ML-KEM and SNTRUP.\n\n* Install libsodium from https://github.com/jedisct1/libsodium\n  and libnacl from https://pypi.python.org/pypi/libnacl if you have\n  a version of OpenSSL older than 1.1.1b installed and you want\n  support for Curve25519 key exchange, Ed25519 keys and certificates,\n  or the Chacha20-Poly1305 cipher.\n\n* Install libnettle from http://www.lysator.liu.se/~nisse/nettle/\n  if you want support for UMAC cryptographic hashes.\n\n* Install pyOpenSSL from https://pypi.python.org/pypi/pyOpenSSL\n  if you want support for X.509 certificate authentication.\n\n* Install pywin32 from https://pypi.python.org/pypi/pywin32 if you\n  want support for using the Pageant agent or support for GSSAPI\n  key exchange and authentication on Windows.\n\nAsyncSSH defines the following optional PyPI extra packages to make it\neasy to install any or all of these dependencies:\n\n  | bcrypt\n  | fido2\n  | gssapi\n  | libnacl\n  | pkcs11\n  | pyOpenSSL\n  | pywin32\n\nFor example, to install bcrypt, fido2, gssapi, libnacl, pkcs11, and\npyOpenSSL on UNIX, you can run:\n\n  ::\n\n    pip install 'asyncssh[bcrypt,fido2,gssapi,libnacl,pkcs11,pyOpenSSL]'\n\nTo install bcrypt, fido2, libnacl, pkcs11, pyOpenSSL, and pywin32 on\nWindows, you can run:\n\n  ::\n\n    pip install 'asyncssh[bcrypt,fido2,libnacl,pkcs11,pyOpenSSL,pywin32]'\n\nNote that you will still need to manually install the libsodium library\nlisted above for libnacl to work correctly and/or libnettle for UMAC\nsupport. Unfortunately, since liboqs, libsodium, and libnettle are not\nPython packages, they cannot be directly installed using pip.\n\nInstalling the development branch\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nIf you would like to install the development branch of asyncssh directly\nfrom Github, you can use the following command to do this:\n\n  ::\n\n      pip install git+https://github.com/ronf/asyncssh@develop\n\nMailing Lists\n-------------\n\nThree mailing lists are available for AsyncSSH:\n\n* `asyncssh-announce@googlegroups.com`__: Project announcements\n* `asyncssh-dev@googlegroups.com`__: Development discussions\n* `asyncssh-users@googlegroups.com`__: End-user discussions\n\n__ http://groups.google.com/d/forum/asyncssh-announce\n__ http://groups.google.com/d/forum/asyncssh-dev\n__ http://groups.google.com/d/forum/asyncssh-users\n",
    "bugtrack_url": null,
    "license": "Eclipse Public License v2.0",
    "summary": "AsyncSSH: Asynchronous SSHv2 client and server library",
    "version": "2.18.0",
    "project_urls": {
        "Documentation": "https://asyncssh.readthedocs.io",
        "Homepage": "http://asyncssh.timeheart.net",
        "Source": "https://github.com/ronf/asyncssh",
        "Tracker": "https://github.com/ronf/asyncssh/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "33d5e5cfc81e8d485be95b7d9b17d7e466656f3a747f9dc0225f3742f6d2f390",
                "md5": "fd9a237642cf191703df30a138f61f51",
                "sha256": "ee09081200753eca137c893995ce3b95f8e157945aa8bda455ea810b30762d96"
            },
            "downloads": -1,
            "filename": "asyncssh-2.18.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fd9a237642cf191703df30a138f61f51",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 367600,
            "upload_time": "2024-10-26T18:03:24",
            "upload_time_iso_8601": "2024-10-26T18:03:24.063052Z",
            "url": "https://files.pythonhosted.org/packages/33/d5/e5cfc81e8d485be95b7d9b17d7e466656f3a747f9dc0225f3742f6d2f390/asyncssh-2.18.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "25698ea398f5aa6ae8fa7d007feb262d83aa9304e4a6a1accf7a104b37fef97e",
                "md5": "9c61e713b1630f62aa1a690744573e1b",
                "sha256": "1a322161c01f60b9719dc8f39f80db71e61f3f5e04abbc3420ce503126d87123"
            },
            "downloads": -1,
            "filename": "asyncssh-2.18.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9c61e713b1630f62aa1a690744573e1b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 526304,
            "upload_time": "2024-10-26T18:03:26",
            "upload_time_iso_8601": "2024-10-26T18:03:26.122866Z",
            "url": "https://files.pythonhosted.org/packages/25/69/8ea398f5aa6ae8fa7d007feb262d83aa9304e4a6a1accf7a104b37fef97e/asyncssh-2.18.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-26 18:03:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ronf",
    "github_project": "asyncssh",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "asyncssh"
}
        
Elapsed time: 0.50409s