summaryrefslogtreecommitdiff
path: root/paramiko/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'paramiko/__init__.py')
-rw-r--r--paramiko/__init__.py113
1 files changed, 36 insertions, 77 deletions
diff --git a/paramiko/__init__.py b/paramiko/__init__.py
index 648b595..4c62ad4 100644
--- a/paramiko/__init__.py
+++ b/paramiko/__init__.py
@@ -16,94 +16,53 @@
# along with Paramiko; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-"""
-I{Paramiko} (a combination of the esperanto words for "paranoid" and "friend")
-is a module for python 2.5 or greater that implements the SSH2 protocol for
-secure (encrypted and authenticated) connections to remote machines. Unlike
-SSL (aka TLS), the SSH2 protocol does not require hierarchical certificates
-signed by a powerful central authority. You may know SSH2 as the protocol that
-replaced C{telnet} and C{rsh} for secure access to remote shells, but the
-protocol also includes the ability to open arbitrary channels to remote
-services across an encrypted tunnel. (This is how C{sftp} works, for example.)
-
-The high-level client API starts with creation of an L{SSHClient} object.
-For more direct control, pass a socket (or socket-like object) to a
-L{Transport}, and use L{start_server <Transport.start_server>} or
-L{start_client <Transport.start_client>} to negoatite
-with the remote host as either a server or client. As a client, you are
-responsible for authenticating using a password or private key, and checking
-the server's host key. I{(Key signature and verification is done by paramiko,
-but you will need to provide private keys and check that the content of a
-public key matches what you expected to see.)} As a server, you are
-responsible for deciding which users, passwords, and keys to allow, and what
-kind of channels to allow.
-
-Once you have finished, either side may request flow-controlled L{Channel}s to
-the other side, which are python objects that act like sockets, but send and
-receive data over the encrypted session.
-
-Paramiko is written entirely in python (no C or platform-dependent code) and is
-released under the GNU Lesser General Public License (LGPL).
-
-Website: U{https://github.com/paramiko/paramiko/}
-
-Mailing list: U{paramiko@librelist.com<mailto:paramiko@librelist.com>}
-"""
-
import sys
-if sys.version_info < (2, 5):
- raise RuntimeError('You need python 2.5+ for this module.')
+if sys.version_info < (2, 6):
+ raise RuntimeError('You need Python 2.6+ for this module.')
__author__ = "Jeff Forcier <jeff@bitprophet.org>"
-__version__ = "1.12.2"
+__version__ = "1.14.0"
__version_info__ = tuple([ int(d) for d in __version__.split(".") ])
__license__ = "GNU Lesser General Public License (LGPL)"
-from transport import SecurityOptions, Transport
-from client import SSHClient, MissingHostKeyPolicy, AutoAddPolicy, RejectPolicy, WarningPolicy
-from auth_handler import AuthHandler
-from channel import Channel, ChannelFile
-from ssh_exception import SSHException, PasswordRequiredException, \
+from paramiko.transport import SecurityOptions, Transport
+from paramiko.client import SSHClient, MissingHostKeyPolicy, AutoAddPolicy, RejectPolicy, WarningPolicy
+from paramiko.auth_handler import AuthHandler
+from paramiko.channel import Channel, ChannelFile
+from paramiko.ssh_exception import SSHException, PasswordRequiredException, \
BadAuthenticationType, ChannelException, BadHostKeyException, \
AuthenticationException, ProxyCommandFailure
-from server import ServerInterface, SubsystemHandler, InteractiveQuery
-from rsakey import RSAKey
-from dsskey import DSSKey
-from ecdsakey import ECDSAKey
-from sftp import SFTPError, BaseSFTP
-from sftp_client import SFTP, SFTPClient
-from sftp_server import SFTPServer
-from sftp_attr import SFTPAttributes
-from sftp_handle import SFTPHandle
-from sftp_si import SFTPServerInterface
-from sftp_file import SFTPFile
-from message import Message
-from packet import Packetizer
-from file import BufferedFile
-from agent import Agent, AgentKey
-from pkey import PKey
-from hostkeys import HostKeys
-from config import SSHConfig
-from proxy import ProxyCommand
-
-# fix module names for epydoc
-for c in locals().values():
- if issubclass(type(c), type) or type(c).__name__ == 'classobj':
- # classobj for exceptions :/
- c.__module__ = __name__
-del c
-
-from common import AUTH_SUCCESSFUL, AUTH_PARTIALLY_SUCCESSFUL, AUTH_FAILED, \
- OPEN_SUCCEEDED, OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED, OPEN_FAILED_CONNECT_FAILED, \
- OPEN_FAILED_UNKNOWN_CHANNEL_TYPE, OPEN_FAILED_RESOURCE_SHORTAGE
-
-from sftp import SFTP_OK, SFTP_EOF, SFTP_NO_SUCH_FILE, SFTP_PERMISSION_DENIED, SFTP_FAILURE, \
- SFTP_BAD_MESSAGE, SFTP_NO_CONNECTION, SFTP_CONNECTION_LOST, SFTP_OP_UNSUPPORTED
-
-from common import io_sleep
+from paramiko.server import ServerInterface, SubsystemHandler, InteractiveQuery
+from paramiko.rsakey import RSAKey
+from paramiko.dsskey import DSSKey
+from paramiko.ecdsakey import ECDSAKey
+from paramiko.sftp import SFTPError, BaseSFTP
+from paramiko.sftp_client import SFTP, SFTPClient
+from paramiko.sftp_server import SFTPServer
+from paramiko.sftp_attr import SFTPAttributes
+from paramiko.sftp_handle import SFTPHandle
+from paramiko.sftp_si import SFTPServerInterface
+from paramiko.sftp_file import SFTPFile
+from paramiko.message import Message
+from paramiko.packet import Packetizer
+from paramiko.file import BufferedFile
+from paramiko.agent import Agent, AgentKey
+from paramiko.pkey import PKey
+from paramiko.hostkeys import HostKeys
+from paramiko.config import SSHConfig
+from paramiko.proxy import ProxyCommand
+
+from paramiko.common import AUTH_SUCCESSFUL, AUTH_PARTIALLY_SUCCESSFUL, AUTH_FAILED, \
+ OPEN_SUCCEEDED, OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED, OPEN_FAILED_CONNECT_FAILED, \
+ OPEN_FAILED_UNKNOWN_CHANNEL_TYPE, OPEN_FAILED_RESOURCE_SHORTAGE
+
+from paramiko.sftp import SFTP_OK, SFTP_EOF, SFTP_NO_SUCH_FILE, SFTP_PERMISSION_DENIED, SFTP_FAILURE, \
+ SFTP_BAD_MESSAGE, SFTP_NO_CONNECTION, SFTP_CONNECTION_LOST, SFTP_OP_UNSUPPORTED
+
+from paramiko.common import io_sleep
__all__ = [ 'Transport',
'SSHClient',