__init__.py 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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. # flake8: noqa
  19. import sys
  20. from paramiko._version import __version__, __version_info__
  21. from paramiko.transport import SecurityOptions, Transport
  22. from paramiko.client import (
  23. SSHClient,
  24. MissingHostKeyPolicy,
  25. AutoAddPolicy,
  26. RejectPolicy,
  27. WarningPolicy,
  28. )
  29. from paramiko.auth_handler import AuthHandler
  30. from paramiko.ssh_gss import GSSAuth, GSS_AUTH_AVAILABLE, GSS_EXCEPTIONS
  31. from paramiko.channel import (
  32. Channel,
  33. ChannelFile,
  34. ChannelStderrFile,
  35. ChannelStdinFile,
  36. )
  37. from paramiko.ssh_exception import (
  38. AuthenticationException,
  39. BadAuthenticationType,
  40. BadHostKeyException,
  41. ChannelException,
  42. ConfigParseError,
  43. CouldNotCanonicalize,
  44. IncompatiblePeer,
  45. PasswordRequiredException,
  46. ProxyCommandFailure,
  47. SSHException,
  48. )
  49. from paramiko.server import ServerInterface, SubsystemHandler, InteractiveQuery
  50. from paramiko.rsakey import RSAKey
  51. from paramiko.dsskey import DSSKey
  52. from paramiko.ecdsakey import ECDSAKey
  53. from paramiko.ed25519key import Ed25519Key
  54. from paramiko.sftp import SFTPError, BaseSFTP
  55. from paramiko.sftp_client import SFTP, SFTPClient
  56. from paramiko.sftp_server import SFTPServer
  57. from paramiko.sftp_attr import SFTPAttributes
  58. from paramiko.sftp_handle import SFTPHandle
  59. from paramiko.sftp_si import SFTPServerInterface
  60. from paramiko.sftp_file import SFTPFile
  61. from paramiko.message import Message
  62. from paramiko.packet import Packetizer
  63. from paramiko.file import BufferedFile
  64. from paramiko.agent import Agent, AgentKey
  65. from paramiko.pkey import PKey, PublicBlob
  66. from paramiko.hostkeys import HostKeys
  67. from paramiko.config import SSHConfig, SSHConfigDict
  68. from paramiko.proxy import ProxyCommand
  69. from paramiko.common import (
  70. AUTH_SUCCESSFUL,
  71. AUTH_PARTIALLY_SUCCESSFUL,
  72. AUTH_FAILED,
  73. OPEN_SUCCEEDED,
  74. OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED,
  75. OPEN_FAILED_CONNECT_FAILED,
  76. OPEN_FAILED_UNKNOWN_CHANNEL_TYPE,
  77. OPEN_FAILED_RESOURCE_SHORTAGE,
  78. )
  79. from paramiko.sftp import (
  80. SFTP_OK,
  81. SFTP_EOF,
  82. SFTP_NO_SUCH_FILE,
  83. SFTP_PERMISSION_DENIED,
  84. SFTP_FAILURE,
  85. SFTP_BAD_MESSAGE,
  86. SFTP_NO_CONNECTION,
  87. SFTP_CONNECTION_LOST,
  88. SFTP_OP_UNSUPPORTED,
  89. )
  90. from paramiko.common import io_sleep
  91. __author__ = "Jeff Forcier <jeff@bitprophet.org>"
  92. __license__ = "GNU Lesser General Public License (LGPL)"
  93. __all__ = [
  94. "Agent",
  95. "AgentKey",
  96. "AuthenticationException",
  97. "AutoAddPolicy",
  98. "BadAuthenticationType",
  99. "BadHostKeyException",
  100. "BufferedFile",
  101. "Channel",
  102. "ChannelException",
  103. "ConfigParseError",
  104. "CouldNotCanonicalize",
  105. "DSSKey",
  106. "ECDSAKey",
  107. "Ed25519Key",
  108. "HostKeys",
  109. "Message",
  110. "MissingHostKeyPolicy",
  111. "PKey",
  112. "PasswordRequiredException",
  113. "ProxyCommand",
  114. "ProxyCommandFailure",
  115. "RSAKey",
  116. "RejectPolicy",
  117. "SFTP",
  118. "SFTPAttributes",
  119. "SFTPClient",
  120. "SFTPError",
  121. "SFTPFile",
  122. "SFTPHandle",
  123. "SFTPServer",
  124. "SFTPServerInterface",
  125. "SSHClient",
  126. "SSHConfig",
  127. "SSHConfigDict",
  128. "SSHException",
  129. "SecurityOptions",
  130. "ServerInterface",
  131. "SubsystemHandler",
  132. "Transport",
  133. "WarningPolicy",
  134. "io_sleep",
  135. "util",
  136. ]