interface documentation

class twisted.conch.interfaces.IConchUser(Interface): (source)

Known implementations: twisted.conch.avatar.ConchUser

View In Hierarchy

A user who has been authenticated to Cred through Conch. This is the interface between the SSH connection and the user.

Attribute conn The SSHConnection object for this user.
Method lookupChannel The other side requested a channel of some sort.
Method lookupSubsystem The other side requested a subsystem.
Method gotGlobalRequest A global request was sent from the other side.
conn = (source)

The SSHConnection object for this user.

def lookupChannel(channelType, windowSize, maxPacket, data): (source)

The other side requested a channel of some sort.

channelType is the type of channel being requested, as an ssh connection protocol channel type. data is any other packet data (often nothing).

We return a subclass of SSHChannel. If the channel type is unknown, we return None.

For other failures, we raise an exception. If a ConchError is raised, the .value will be the message, and the .data will be the error code.

ParameterschannelTypeThe requested channel type (type: bytes)
windowSizeThe initial size of the remote window (type: int)
maxPacketThe largest packet we should send (type: int)
dataAdditional request data (type: bytes)
ReturnsUndocumented (type: a subclass of SSHChannel or None)
def lookupSubsystem(subsystem, data): (source)

The other side requested a subsystem.

We return a Protocol implementing the requested subsystem. If the subsystem is not available, we return None.

ParameterssubsystemThe name of the subsystem being requested (type: bytes)
dataAdditional request data (often nothing) (type: bytes)
ReturnsUndocumented (type: Protocol or None)
def gotGlobalRequest(requestType, data): (source)

A global request was sent from the other side.

We return a true value on success or a false value on failure. If we indicate success by returning a tuple, its second item will be sent to the other side as additional response data.

ParametersrequestTypeThe type of the request (type: bytes)
dataAdditional request data (type: bytes)
ReturnsUndocumented (type: boolean or tuple)
API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.