userauth.SSHUserAuthServer expects an SSH transport which has a factory attribute which has a portal attribute. Because the portal is important for testing authentication, we need to be able to provide an interesting portal object to the SSHUserAuthServer.

In addition, we want to be able to capture any packets sent over the transport.

ParameterslostConnecionTrue if loseConnection has been called on us.
Instance Variable packets a list of 2-tuples: (messageType, data). Each 2-tuple is a sent packet. (type: list)
Class Service A mock service, representing the other service offered by the server.
Class Factory A mock factory, representing the factory that spawned this user auth service.
Method __init__ Undocumented
Method sendPacket Record the packet sent by the service.
Method isEncrypted Pretend that this transport encrypts traffic in both directions. The SSHUserAuthServer disables password authentication if the transport isn't encrypted.
Method loseConnection Undocumented
packets =
a list of 2-tuples: (messageType, data). Each 2-tuple is a sent packet. (type: list)
def __init__(self, portal):
Undocumented
def sendPacket(self, messageType, message):

Record the packet sent by the service.

def isEncrypted(self, direction):

Pretend that this transport encrypts traffic in both directions. The SSHUserAuthServer disables password authentication if the transport isn't encrypted.

def loseConnection(self):
Undocumented
API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.