__init__.py 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
  18. # flake8: noqa
  19. import sys
  20. from paramiko._version import __version__, __version_info__
  21. if sys.version_info < (2, 6):
  22. raise RuntimeError('You need Python 2.6+ for this module.')
  23. __author__ = "Jeff Forcier <jeff@bitprophet.org>"
  24. __license__ = "GNU Lesser General Public License (LGPL)"
  25. from paramiko.transport import SecurityOptions, Transport
  26. from paramiko.client import (
  27. SSHClient, MissingHostKeyPolicy, AutoAddPolicy, RejectPolicy,
  28. WarningPolicy,
  29. )
  30. from paramiko.auth_handler import AuthHandler
  31. from paramiko.ssh_gss import GSSAuth, GSS_AUTH_AVAILABLE
  32. from paramiko.channel import Channel, ChannelFile
  33. from paramiko.ssh_exception import (
  34. SSHException, PasswordRequiredException, BadAuthenticationType,
  35. ChannelException, BadHostKeyException, AuthenticationException,
  36. ProxyCommandFailure,
  37. )
  38. from paramiko.server import ServerInterface, SubsystemHandler, InteractiveQuery
  39. from paramiko.rsakey import RSAKey
  40. from paramiko.dsskey import DSSKey
  41. from paramiko.ecdsakey import ECDSAKey
  42. from paramiko.ed25519key import Ed25519Key
  43. from paramiko.sftp import SFTPError, BaseSFTP
  44. from paramiko.sftp_client import SFTP, SFTPClient
  45. from paramiko.sftp_server import SFTPServer
  46. from paramiko.sftp_attr import SFTPAttributes
  47. from paramiko.sftp_handle import SFTPHandle
  48. from paramiko.sftp_si import SFTPServerInterface
  49. from paramiko.sftp_file import SFTPFile
  50. from paramiko.message import Message
  51. from paramiko.packet import Packetizer
  52. from paramiko.file import BufferedFile
  53. from paramiko.agent import Agent, AgentKey
  54. from paramiko.pkey import PKey
  55. from paramiko.hostkeys import HostKeys
  56. from paramiko.config import SSHConfig
  57. from paramiko.proxy import ProxyCommand
  58. from paramiko.common import (
  59. AUTH_SUCCESSFUL, AUTH_PARTIALLY_SUCCESSFUL, AUTH_FAILED, OPEN_SUCCEEDED,
  60. OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED, OPEN_FAILED_CONNECT_FAILED,
  61. OPEN_FAILED_UNKNOWN_CHANNEL_TYPE, OPEN_FAILED_RESOURCE_SHORTAGE,
  62. )
  63. from paramiko.sftp import (
  64. SFTP_OK, SFTP_EOF, SFTP_NO_SUCH_FILE, SFTP_PERMISSION_DENIED, SFTP_FAILURE,
  65. SFTP_BAD_MESSAGE, SFTP_NO_CONNECTION, SFTP_CONNECTION_LOST,
  66. SFTP_OP_UNSUPPORTED,
  67. )
  68. from paramiko.common import io_sleep
  69. __all__ = [
  70. 'Transport',
  71. 'SSHClient',
  72. 'MissingHostKeyPolicy',
  73. 'AutoAddPolicy',
  74. 'RejectPolicy',
  75. 'WarningPolicy',
  76. 'SecurityOptions',
  77. 'SubsystemHandler',
  78. 'Channel',
  79. 'PKey',
  80. 'RSAKey',
  81. 'DSSKey',
  82. 'Message',
  83. 'SSHException',
  84. 'AuthenticationException',
  85. 'PasswordRequiredException',
  86. 'BadAuthenticationType',
  87. 'ChannelException',
  88. 'BadHostKeyException',
  89. 'ProxyCommand',
  90. 'ProxyCommandFailure',
  91. 'SFTP',
  92. 'SFTPFile',
  93. 'SFTPHandle',
  94. 'SFTPClient',
  95. 'SFTPServer',
  96. 'SFTPError',
  97. 'SFTPAttributes',
  98. 'SFTPServerInterface',
  99. 'ServerInterface',
  100. 'BufferedFile',
  101. 'Agent',
  102. 'AgentKey',
  103. 'HostKeys',
  104. 'SSHConfig',
  105. 'util',
  106. 'io_sleep',
  107. ]