Coverage for /pythoncovmergedfiles/medio/medio/src/paramiko/paramiko/__init__.py: 97%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

35 statements  

1# Copyright (C) 2003-2011 Robey Pointer <robeypointer@gmail.com> 

2# 

3# This file is part of paramiko. 

4# 

5# Paramiko is free software; you can redistribute it and/or modify it under the 

6# terms of the GNU Lesser General Public License as published by the Free 

7# Software Foundation; either version 2.1 of the License, or (at your option) 

8# any later version. 

9# 

10# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY 

11# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 

12# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 

13# details. 

14# 

15# You should have received a copy of the GNU Lesser General Public License 

16# along with Paramiko; if not, write to the Free Software Foundation, Inc., 

17# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 

18 

19from importlib import metadata 

20 

21__version__ = metadata.version("paramiko") 

22 

23# flake8: noqa 

24from paramiko.transport import ( 

25 SecurityOptions, 

26 ServiceRequestingTransport, 

27 Transport, 

28) 

29from paramiko.client import ( 

30 AutoAddPolicy, 

31 MissingHostKeyPolicy, 

32 RejectPolicy, 

33 SSHClient, 

34 WarningPolicy, 

35) 

36from paramiko.auth_handler import AuthHandler 

37from paramiko.auth_strategy import ( 

38 AuthFailure, 

39 AuthStrategy, 

40 AuthResult, 

41 AuthSource, 

42 InMemoryPrivateKey, 

43 NoneAuth, 

44 OnDiskPrivateKey, 

45 Password, 

46 PrivateKey, 

47 SourceResult, 

48) 

49from paramiko.ssh_gss import GSSAuth, GSS_AUTH_AVAILABLE, GSS_EXCEPTIONS 

50from paramiko.channel import ( 

51 Channel, 

52 ChannelFile, 

53 ChannelStderrFile, 

54 ChannelStdinFile, 

55) 

56from paramiko.ssh_exception import ( 

57 AuthenticationException, 

58 BadAuthenticationType, 

59 BadHostKeyException, 

60 ChannelException, 

61 ConfigParseError, 

62 CouldNotCanonicalize, 

63 IncompatiblePeer, 

64 MessageOrderError, 

65 PasswordRequiredException, 

66 ProxyCommandFailure, 

67 SSHException, 

68) 

69from paramiko.server import ServerInterface, SubsystemHandler, InteractiveQuery 

70from paramiko.rsakey import RSAKey 

71from paramiko.ecdsakey import ECDSAKey 

72from paramiko.ed25519key import Ed25519Key 

73from paramiko.sftp import SFTPError, BaseSFTP 

74from paramiko.sftp_client import SFTP, SFTPClient 

75from paramiko.sftp_server import SFTPServer 

76from paramiko.sftp_attr import SFTPAttributes 

77from paramiko.sftp_handle import SFTPHandle 

78from paramiko.sftp_si import SFTPServerInterface 

79from paramiko.sftp_file import SFTPFile 

80from paramiko.message import Message 

81from paramiko.packet import Packetizer 

82from paramiko.file import BufferedFile 

83from paramiko.agent import Agent, AgentKey 

84from paramiko.pkey import PKey, PublicBlob, UnknownKeyType 

85from paramiko.hostkeys import HostKeys 

86from paramiko.config import SSHConfig, SSHConfigDict 

87from paramiko.proxy import ProxyCommand 

88 

89from paramiko.common import ( 

90 AUTH_SUCCESSFUL, 

91 AUTH_PARTIALLY_SUCCESSFUL, 

92 AUTH_FAILED, 

93 OPEN_SUCCEEDED, 

94 OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED, 

95 OPEN_FAILED_CONNECT_FAILED, 

96 OPEN_FAILED_UNKNOWN_CHANNEL_TYPE, 

97 OPEN_FAILED_RESOURCE_SHORTAGE, 

98) 

99 

100from paramiko.sftp import ( 

101 SFTP_OK, 

102 SFTP_EOF, 

103 SFTP_NO_SUCH_FILE, 

104 SFTP_PERMISSION_DENIED, 

105 SFTP_FAILURE, 

106 SFTP_BAD_MESSAGE, 

107 SFTP_NO_CONNECTION, 

108 SFTP_CONNECTION_LOST, 

109 SFTP_OP_UNSUPPORTED, 

110) 

111 

112from paramiko.common import io_sleep 

113 

114 

115# TODO: I guess a real plugin system might be nice for future expansion... 

116key_classes = [RSAKey, Ed25519Key, ECDSAKey] 

117 

118 

119__author__ = "Jeff Forcier <jeff@bitprophet.org>" 

120__license__ = "GNU Lesser General Public License (LGPL)"