Home | Trees | Index | Help |
---|
Package paramiko :: Class ServerInterface |
|
object
--+
|
ServerInterface
This class defines an interface for controlling the behavior of paramiko in server mode.
Methods on this class are called from paramiko's primary thread, so you shouldn't do too much work in them. (Certainly nothing that blocks or sleeps.)Method Summary | |
---|---|
int or InteractiveQuery
|
Begin an interactive authentication challenge, if supported. |
int or InteractiveQuery
|
Continue or finish an interactive authentication challenge, if supported. |
int |
Determine if a client may open channels with no (further) authentication. |
int |
Determine if a given username and password supplied by the client is acceptable for use in authentication. |
int |
Determine if a given key supplied by the client is acceptable for use in authentication. |
bool |
Determine if a shell command will be executed for the client. |
bool |
Determine if a pseudo-terminal of the given dimensions (usually requested for shell access) can be provided on the given channel. |
int |
Determine if a channel request of a given type will be granted, and return OPEN_SUCCEEDED or an error code. |
bool |
Determine if a shell will be provided to the client on the given channel. |
bool |
Determine if a requested subsystem will be provided to the client on the given channel. |
bool |
Determine if the pseudo-terminal on the given channel can be resized. |
bool |
Handle a global request of the given kind . |
str |
Return a list of authentication methods supported by the server. |
Inherited from object | |
x.__init__(...) initializes x; see x.__class__.__doc__ for signature | |
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.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Method Details |
---|
check_auth_interactive(self, username, submethods)Begin an interactive authentication challenge, if supported. You
should override this method in server mode if you want to support the
Return AUTH_FAILED .
|
check_auth_interactive_response(self, responses)Continue or finish an interactive authentication challenge, if
supported. You should override this method in server mode if you want
to support the Return If you wish to continue interactive authentication with more
questions, you may return an AUTH_FAILED .
|
check_auth_none(self, username)Determine if a client may open channels with no (further) authentication. Return AUTH_FAILED .
|
check_auth_password(self, username, password)Determine if a given username and password supplied by the client is acceptable for use in authentication. Return AUTH_FAILED .
|
check_auth_publickey(self, username, key)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 Note that you don't have to actually verify any key signtature here. If you're willing to accept the key, paramiko will do the work of verifying the client's signature. The default implementation always returnsAUTH_FAILED .
|
check_channel_exec_request(self, channel, command)Determine if a shell command will be executed for the client. If
this method returns False .
|
check_channel_pty_request(self, channel, term, width, height, pixelwidth, pixelheight, modes)Determine if a pseudo-terminal of the given dimensions (usually requested for shell access) can be provided on the given channel. The default implementation always returnsFalse .
|
check_channel_request(self, kind, chanid)Determine if a channel request of a given type will be granted, and
return
The OPEN_SUCCEEDED (or
0 ) to allow the channel request, or one of the following
error codes to reject it:
OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED .
|
check_channel_shell_request(self, channel)Determine if a shell will be provided to the client on the given
channel. If this method returns False .
|
check_channel_subsystem_request(self, channel, name)Determine if a requested subsystem will be provided to the client on
the given channel. If this method returns Transport.set_subsystem_handler . If one
has been set, the handler is invoked and this method returns
True . Otherwise it returns False .
|
check_channel_window_change_request(self, channel, width, height, pixelwidth, pixelheight)Determine if the pseudo-terminal on the given channel can be resized. This only makes sense if a pty was previously allocated on it. The default implementation always returnsFalse .
|
check_global_request(self, kind, msg)Handle a global request of the given There aren't any useful global requests defined, aside from port forwarding, so usually this type of request is an extension to the protocol. If the request was successful and you would like to return contextual data to the remote host, return a tuple. Items in the tuple will be sent back with the successful result. (Note that the items in the tuple can only be strings, ints, longs, or bools.) The default implementation always returnsFalse ,
indicating that it does not support any global requests.
|
get_allowed_auths(self, username)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" .
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Sun Dec 4 11:16:47 2005 | http://epydoc.sf.net |