class documentation

class RekeyAvatar(ConchUser): (source)

Implements interfaces: twisted.conch.interfaces.ISession

View In Hierarchy

This avatar implements a shell which sends 60 numbered lines to whatever connects to it, then closes the session with a 0 exit status.

60 lines is selected as being enough to send more than 2kB of traffic, the amount the client is configured to initiate a rekey after.

Method __init__ Undocumented
Method closed Ignore the close of the session.
Method eofReceived Called when the other side has indicated no more data will be sent.
Method execCommand Execute a command.
Method getPty Get a pseudo-terminal for use by a shell or command.
Method openShell Write 60 lines of data to the transport, then exit.
Method windowChanged Called when the size of the remote screen has changed.

Inherited from ConchUser:

Method conn.setter Undocumented
Method gotGlobalRequest A global request was sent from the other side.
Method lookupChannel The other side requested a channel of some sort.
Method lookupSubsystem The other side requested a subsystem.
Instance Variable channelLookup Undocumented
Instance Variable subsystemLookup Undocumented
Property conn The SSHConnection object for this user.
Class Variable _log Undocumented
Instance Variable _conn Undocumented
def __init__(self): (source)
def closed(self): (source)

Ignore the close of the session.

def eofReceived(self): (source)

Called when the other side has indicated no more data will be sent.

def execCommand(self, proto, command): (source)

Execute a command.

Parameters
protoa ProcessProtocol instance.
commandUndocumented
def getPty(self, term, windowSize, modes): (source)

Get a pseudo-terminal for use by a shell or command.

If a pseudo-terminal is not available, or the request otherwise fails, raise an exception.

def openShell(self, transport): (source)

Write 60 lines of data to the transport, then exit.

def windowChanged(self, newWindowSize): (source)

Called when the size of the remote screen has changed.