1# Copyright (c) 2013-2021 by Ron Frederick <ronf@timeheart.net> and others. 2# 3# This program and the accompanying materials are made available under 4# the terms of the Eclipse Public License v2.0 which accompanies this 5# distribution and is available at: 6# 7# http://www.eclipse.org/legal/epl-2.0/ 8# 9# This program may also be made available under the following secondary 10# licenses when the conditions for such availability set forth in the 11# Eclipse Public License v2.0 are satisfied: 12# 13# GNU General Public License, Version 2.0, or any later versions of 14# that license 15# 16# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later 17# 18# Contributors: 19# Ron Frederick - initial implementation, API, and documentation 20 21"""An asynchronous SSH2 library for Python""" 22 23from .version import __author__, __author_email__, __url__, __version__ 24 25# pylint: disable=wildcard-import 26 27from .constants import * 28 29# pylint: enable=wildcard-import 30 31from .agent import SSHAgentClient, SSHAgentKeyPair, connect_agent 32 33from .auth_keys import SSHAuthorizedKeys 34from .auth_keys import import_authorized_keys, read_authorized_keys 35 36from .channel import SSHClientChannel, SSHServerChannel 37from .channel import SSHTCPChannel, SSHUNIXChannel 38 39from .client import SSHClient 40 41from .config import ConfigParseError 42 43from .connection import SSHAcceptor, SSHClientConnection, SSHServerConnection 44from .connection import SSHClientConnectionOptions, SSHServerConnectionOptions 45from .connection import create_connection, create_server, connect, listen 46from .connection import connect_reverse, listen_reverse, get_server_host_key 47 48from .editor import SSHLineEditorChannel 49 50from .known_hosts import SSHKnownHosts 51from .known_hosts import import_known_hosts, read_known_hosts 52from .known_hosts import match_known_hosts 53 54from .listener import SSHListener 55 56from .logging import logger, set_log_level, set_sftp_log_level, set_debug_level 57 58from .misc import Error, DisconnectError, ChannelOpenError, ChannelListenError 59from .misc import ConnectionLost, CompressionError, HostKeyNotVerifiable 60from .misc import KeyExchangeFailed, IllegalUserName, MACError 61from .misc import PermissionDenied, ProtocolError, ProtocolNotSupported 62from .misc import ServiceNotAvailable 63from .misc import PasswordChangeRequired 64from .misc import BreakReceived, SignalReceived, TerminalSizeChanged 65 66from .pbe import KeyEncryptionError 67 68from .pkcs11 import load_pkcs11_keys 69 70from .process import SSHClientProcess, SSHServerProcess 71from .process import SSHCompletedProcess, ProcessError 72from .process import TimeoutError # pylint: disable=redefined-builtin 73from .process import DEVNULL, PIPE, STDOUT 74 75from .public_key import SSHKey, SSHKeyPair, SSHCertificate 76from .public_key import KeyGenerationError, KeyImportError, KeyExportError 77from .public_key import generate_private_key, import_private_key 78from .public_key import import_public_key, import_certificate 79from .public_key import read_private_key, read_public_key, read_certificate 80from .public_key import read_private_key_list, read_public_key_list 81from .public_key import read_certificate_list 82from .public_key import load_keypairs, load_public_keys, load_certificates 83from .public_key import load_resident_keys 84 85from .scp import scp 86 87from .session import SSHClientSession, SSHServerSession 88from .session import SSHTCPSession, SSHUNIXSession 89 90from .server import SSHServer 91 92from .sftp import SFTPClient, SFTPClientFile, SFTPServer, SFTPError 93from .sftp import SFTPEOFError, SFTPNoSuchFile, SFTPPermissionDenied 94from .sftp import SFTPFailure, SFTPBadMessage, SFTPNoConnection 95from .sftp import SFTPConnectionLost, SFTPOpUnsupported 96from .sftp import SFTPAttrs, SFTPVFSAttrs, SFTPName 97from .sftp import SEEK_SET, SEEK_CUR, SEEK_END 98 99from .stream import SSHReader, SSHWriter 100 101from .subprocess import SSHSubprocessReadPipe, SSHSubprocessWritePipe 102from .subprocess import SSHSubprocessProtocol, SSHSubprocessTransport 103 104# Import these explicitly to trigger register calls in them 105from . import sk_eddsa, sk_ecdsa, eddsa, ecdsa, rsa, dsa, kex_dh, kex_rsa 106