Home | Trees | Indices | Help |
---|
|
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.)
Instance Methods | |||
|
|||
int or InteractiveQuery |
|
||
int or InteractiveQuery |
|
||
int |
|
||
int |
|
||
int |
|
||
int |
|
||
bool |
|
||
bool |
|
||
int |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
int |
|
||
str |
|
||
Inherited from |
Properties | |
Inherited from |
Method Details |
The client would like to cancel a previous port-forwarding request. If the given address and port is being forwarded across this ssh connection, the port should be closed.
|
Begin an interactive authentication challenge, if supported. You
should override this method in server mode if you want to support the
Return AUTH_FAILED if this auth method isn't supported. Otherwise, you should return an InteractiveQuery object containing the prompts and instructions for the user. The response will be sent via a call to check_auth_interactive_response. The default implementation always returns AUTH_FAILED.
|
Continue or finish an interactive authentication challenge, if
supported. You should override this method in server mode if you want to
support the Return AUTH_FAILED if the responses are not accepted, AUTH_SUCCESSFUL if the responses are accepted and complete the authentication, or AUTH_PARTIALLY_SUCCESSFUL if your authentication is stateful, and this set of responses is accepted for authentication, but more authentication is required. (In this latter case, get_allowed_auths will be called to report to the client what options it has for continuing the authentication.) If you wish to continue interactive authentication with more questions, you may return an InteractiveQuery object, which should cause the client to respond with more answers, calling this method again. This cycle can continue indefinitely. The default implementation always returns AUTH_FAILED.
|
Determine if a client may open channels with no (further) authentication. Return AUTH_FAILED if the client must authenticate, or AUTH_SUCCESSFUL if it's okay for the client to not authenticate. The default implementation always returns AUTH_FAILED.
|
Determine if a given username and password supplied by the client is acceptable for use in authentication. Return AUTH_FAILED if the password is not accepted, AUTH_SUCCESSFUL if the password is accepted and completes the authentication, or AUTH_PARTIALLY_SUCCESSFUL if your authentication is stateful, and this key is accepted for authentication, but more authentication is required. (In this latter case, get_allowed_auths will be called to report to the client what options it has for continuing the authentication.) The default implementation always returns AUTH_FAILED.
|
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 if the key is not accepted, AUTH_SUCCESSFUL if the key is accepted and completes the authentication, or AUTH_PARTIALLY_SUCCESSFUL if your authentication is stateful, and this password is accepted for authentication, but more authentication is required. (In this latter case, get_allowed_auths will be called to report to the client what options it has for continuing the authentication.) 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 returns AUTH_FAILED.
|
Determine if a local port forwarding channel will be granted, and
return The The origin and destination parameters are (ip_address, port) tuples that correspond to both ends of the TCP connection in the forwarding tunnel. The return value should either be
The default implementation always returns
|
Determine if a shell command will be executed for the client. If this
method returns The default implementation always returns
Since: 1.1 |
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 returns
|
Determine if a channel request of a given type will be granted, and
return If you allow channel requests (and an ssh server that didn't would be useless), you should also override some of the channel request methods below, which are used to determine which services will be allowed on a given channel:
The The return value should either be
The default implementation always returns
|
Determine if a shell will be provided to the client on the given
channel. If this method returns The default implementation always returns |
Determine if a requested subsystem will be provided to the client on
the given channel. If this method returns The default implementation checks for a subsystem handler assigned via
Transport.set_subsystem_handler. If one has been set,
the handler is invoked and this method returns
Note: Because the default implementation uses the Transport to identify valid subsystems, you probably won't need to override this method. |
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 returns
|
Determine if the client will be provided with an X11 session. If this
method returns The default implementation always returns
|
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 returns
Note: Port forwarding requests are handled separately, in check_port_forward_request. |
Handle a request for port forwarding. The client is asking that
connections to the given address and port be forwarded back across this
ssh connection. An address of The default implementation always returns
|
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
The default implementation always returns
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Sun Nov 1 22:14:17 2009 | http://epydoc.sourceforge.net |