Package paramiko |
[frames] | no frames]

# Package paramiko

source code

Paramiko (a combination of the esperanto words for "paranoid" and "friend") is a module for python 2.3 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 heirarchical certificates signed by a powerful central authority. You may know SSH2 as the protocol that replaced `telnet` and `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 `sftp` works, for example.)

The high-level client API starts with creation of an SSHClient object. For more direct control, pass a socket (or socket-like object) to a Transport, and use start_server or 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. (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 Channels 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: http://www.lag.net/paramiko/

Version: 1.7.5 (Ernest)

Author: Robey Pointer

Contact: robeypointer@gmail.com

License: GNU Lesser General Public License (LGPL)

Date: 19 Jul 2009

Submodules
paramiko.agent: SSH Agent interface for Unix clients. paramiko.auth_handler: AuthHandler paramiko.ber paramiko.buffered_pipe: Attempt to generalize the "feeder" part of a Channel: an object which can be read from and closed, but is reading from a buffer fed by another thread. paramiko.channel: Abstraction for an SSH2 channel. paramiko.client: SSHClient. paramiko.common: Common constants and global variables. paramiko.compress: Compression implementations for a Transport. paramiko.config: SSHConfig. paramiko.dsskey: DSSKey paramiko.file: BufferedFile. paramiko.hostkeys: HostKeys paramiko.kex_gex: Variant on KexGroup1 where the prime "p" and generator "g" are provided by the server. paramiko.kex_group1: Standard SSH key exchange ("kex" if you wanna sound cool). paramiko.logging22: Stub out logging on python < 2.3. paramiko.message: Implementation of an SSH2 "message". paramiko.packet: Packetizer. paramiko.pipe: Abstraction of a one-way pipe where the read end can be used in select(). paramiko.pkey: Common API for all public keys. paramiko.primes: Utility functions for dealing with primes. paramiko.resource: Resource manager. paramiko.rng paramiko.rng_posix paramiko.rng_win32 paramiko.rsakey: RSAKey paramiko.server: ServerInterface is an interface to override for server support. paramiko.sftp paramiko.sftp_attr paramiko.sftp_client: Client-mode SFTP support. paramiko.sftp_file: SFTPFile paramiko.sftp_handle: Abstraction of an SFTP file handle (for server mode). paramiko.sftp_server: Server-mode SFTP support. paramiko.sftp_si: SFTPServerInterface is an interface to override for SFTP server support. paramiko.ssh_exception: Exceptions defined by paramiko. paramiko.transport: Transport handles the core SSH2 protocol. paramiko.util: Useful functions used by the rest of paramiko. paramiko.win_pageant: Functions for communicating with Pageant, the basic windows ssh agent program.

Classes
| SecurityOptions Simple object containing the security preferences of an ssh transport.
| Transport An SSH Transport attaches to a stream (usually a socket), negotiates an encrypted session, authenticates, and then creates stream tunnels, called Channels, across the session.
| SSHClient A high-level representation of a session with an SSH server.
| MissingHostKeyPolicy Interface for defining the policy that SSHClient should use when the SSH server's hostname is not in either the system host keys or the application's keys.
| AutoAddPolicy Policy for automatically adding the hostname and new host key to the local HostKeys object, and saving it.
| RejectPolicy Policy for automatically rejecting the unknown hostname & key.
| WarningPolicy Policy for logging a python-style warning for an unknown host key, but accepting it.
| Channel A secure tunnel across an SSH Transport.
| SSHException Exception raised by failures in SSH2 protocol negotiation or logic errors.
| PasswordRequiredException Exception raised when a password is needed to unlock a private key file.
| BadAuthenticationType Exception raised when an authentication type (like password) is used, but the server isn't allowing that type.
| ChannelException Exception raised when an attempt to open a new Channel fails.
| BadHostKeyException The host key given by the SSH server did not match what we were expecting.
| AuthenticationException Exception raised when authentication failed for some reason.
| ServerInterface This class defines an interface for controlling the behavior of paramiko in server mode.
| SubsystemHandler Handler for a subsytem in server mode.
| RSAKey Representation of an RSA key which can be used to sign and verify SSH2 data.
| DSSKey Representation of a DSS key which can be used to sign an verify SSH2 data.
| SFTPError
| SFTP an alias for SFTPClient for backwards compatability
| SFTPClient SFTP client object.
| SFTPServer Server-side SFTP subsystem support.
| SFTPAttributes Representation of the attributes of a file (or proxied file) for SFTP in client or server mode.
| SFTPHandle Abstract object representing a handle to an open file (or folder) in an SFTP server implementation.
| SFTPServerInterface This class defines an interface for controlling the behavior of paramiko when using the SFTPServer subsystem to provide an SFTP server.
| SFTPFile Proxy object for a file on the remote server, in client mode SFTP.
| Message An SSH2 Message is a stream of bytes that encodes some combination of strings, integers, bools, and infinite-precision integers (known in python as longs).
| BufferedFile Reusable base class to implement python-style file buffering around a simpler stream.
| Agent Client interface for using private keys from an SSH agent running on the local machine.
| AgentKey Private key held in a local SSH agent.
| PKey Base class for public keys.
| HostKeys Representation of an openssh-style "known hosts" file.
| SSHConfig Representation of config information as stored in the format used by OpenSSH.