Package paramiko
[frames] | no frames]

Source Code for Package paramiko

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