Home | Trees | Index | Help |
---|
Package paramiko :: Module auth_transport :: Class Transport |
|
object
--+ |_Verbose
--+ |Thread
--+ |BaseTransport
--+ | Transport
Channel
s, across the session. Multiple
channels can be multiplexed across a single session (and often are, in
the case of port forwardings).
Note: Because each Transport has a worker thread running in the background,
you must call close
on the Transport to kill this thread.
On many platforms, the python interpreter will refuse to exit cleanly if
any of these threads are still running (and you'll have to kill
-9
from another shell window).
Method Summary | |
---|---|
Create a new SSH session over an existing socket, or socket-like object. | |
string |
Returns a string representation of this object, for debugging. |
Authenticate to the server using a password. | |
Authenticate to the server using a private key. | |
int |
(subclass override) Determine if a client may open channels with no (further) authentication. |
int |
(subclass override) Determine if a given username and password supplied by the client is acceptable for use in authentication. |
int |
(subclass override) Determine if a given key supplied by the client is acceptable for use in authentication. |
string |
(subclass override) Return a list of authentication methods supported by the server. |
string |
Return the username this connection is authenticated for. |
bool |
Return true if this session is active and authenticated. |
_disconnect_no_more_auth(self)
| |
_disconnect_service_not_available(self)
| |
_get_session_blob(self,
key,
service,
username)
| |
_parse_service_accept(self,
m)
| |
_parse_service_request(self,
m)
| |
_parse_userauth_banner(self,
m)
| |
_parse_userauth_failure(self,
m)
| |
_parse_userauth_request(self,
m)
| |
_parse_userauth_success(self,
m)
| |
_request_auth(self)
| |
Inherited from BaseTransport | |
| |
Add a host key to the list of keys used for server mode. | |
Channel
|
(subclass override) Determine if a channel request of a given type will be granted, and return a suitable Channel object. |
bool |
(subclass override) Handle a global request of the given kind . |
Close this session, and any open channels that are tied to it. | |
Negotiate an SSH2 session, and optionally verify the server's host key and authenticate using a password or private key. | |
PKey
|
Return the host key of the server (in client mode). |
PKey
|
Return the active host key, in server mode. |
Message
|
Make a global request to the remote host. |
bool |
Return true if this session is active (open). |
bool |
(optional) Load a file of prime moduli for use in doing group-exchange key negotiation in server mode. (Static method) |
Channel
|
Request a new channel to the server. |
Channel
|
Request a new channel to the server, of type "session" . |
bool |
Force this session to switch to new keys. |
Send a junk packet across the encrypted link. | |
Turn on/off keepalive packets (default is off). | |
Negotiate a new SSH2 session as a client. | |
Negotiate a new SSH2 session as a server. | |
switch on newly negotiated encryption parameters for inbound traffic | |
switch on newly negotiated encryption parameters for outbound traffic | |
| |
| |
| |
id is 'A' - 'F' for the various keys used by ssh | |
used by a kex object to register the next packet type it expects to see | |
| |
used by KexGex to find primes for group exchange | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
only one thread will ever be in this function | |
| |
announce to the other side that we'd like to negotiate keys, and what kind of key negotiation we support. | |
| |
used by a kex object to set the K (root key) and H (exchange hash) | |
used by a Channel to remove itself from the active channel list | |
| |
| |
Inherited from Thread | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Inherited from _Verbose | |
| |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Class Variable Summary | |
---|---|
int |
AUTH_FAILED = 2 |
int |
AUTH_PARTIALLY_SUCCESSFUL = 1 |
int |
AUTH_SUCCESSFUL = 0 |
dict |
_handler_table = {5: <function _parse_service_request at...
|
Inherited from BaseTransport | |
int |
OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED = 1 |
int |
OPEN_FAILED_CONNECT_FAILED = 2 |
int |
OPEN_FAILED_RESOURCE_SHORTAGE = 4 |
int |
OPEN_FAILED_UNKNOWN_CHANNEL_TYPE = 3 |
list |
preferred_ciphers = ['aes128-cbc', 'blowfish-cbc', 'aes2...
|
list |
preferred_kex = ['diffie-hellman-group1-sha1', 'diffie-h...
|
list |
preferred_keys = ['ssh-rsa', 'ssh-dss']
|
list |
preferred_macs = ['hmac-sha1', 'hmac-md5', 'hmac-sha1-96...
|
int |
REKEY_BYTES = 1073741824 |
int |
REKEY_PACKETS = 1073741824 |
dict |
_channel_handler_table = {96: <unbound method Channel._h...
|
dict |
_cipher_info = {'blowfish-cbc': {'block-size': 8, 'key-s...
|
str |
_CLIENT_ID = 'pyssh_1.1'
|
dict |
_kex_info = {'diffie-hellman-group1-sha1': <class 'param...
|
dict |
_mac_info = {'hmac-sha1': {'class': <module 'Crypto.Hash...
|
NoneType |
_modulus_pack = None |
str |
_PROTO_ID = '2.0'
|
Inherited from Thread | |
bool |
_Thread__initialized = False
|
Instance Method Details |
---|
__init__(self,
sock)
|
__repr__(self)
Returns a string representation of this object, for debugging.
|
auth_password(self, username, password, event)Authenticate to the server using a password. The username and password are sent over an encrypted link, and the givenevent is triggered on success or failure.
On success, is_authenticated will return
True .
|
auth_publickey(self, username, key, event)Authenticate to the server using a private key. The key is used to sign data from the server, so it must include the private part. The givenevent is triggered on success or failure.
On success, is_authenticated will return
True .
|
check_auth_none(self, username)(subclass override) Determine if a client may open channels with no (further) authentication. You should override this method in server mode. Return AUTH_FAILED .
|
check_auth_password(self, username, password)(subclass override) Determine if a given username and password supplied by the client is acceptable for use in authentication. You should override this method in server mode. Return AUTH_FAILED .
|
check_auth_publickey(self, username, key)(subclass override) Determine if a given key supplied by the client is acceptable for use in authentication. You should override this method in server mode to check the username and key and decide if you would accept a signature made using this key. Return AUTH_FAILED .
|
get_allowed_auths(self, username)(subclass override) Return a list of authentication methods supported by the server. This list is sent to clients attempting to authenticate, to inform them of authentication methods that might be successful. The "list" is actually a string of comma-separated names
of types of authentication. Possible values are
"password" .
|
get_username(self)Return the username this connection is authenticated for. If the session is not authenticated (or authentication failed), this method returnsNone .
|
is_authenticated(self)Return true if this session is active and authenticated.
|
Class Variable Details |
---|
AUTH_FAILED
|
AUTH_PARTIALLY_SUCCESSFUL
|
AUTH_SUCCESSFUL
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Fri Apr 23 15:55:49 2004 | http://epydoc.sf.net |