class documentation

class SSHFactory(protocol.Factory): (source)

Known subclasses: twisted.conch.manhole_ssh.ConchFactory, twisted.conch.openssh_compat.factory.OpenSSHFactory

View In Hierarchy

A Factory for SSH servers.
Method build​Protocol Create an instance of the server side of the SSH protocol.
Method get​DHPrime Return a tuple of (g, p) for a Diffe-Hellman process, with p being as close to bits bits as possible.
Method get​Primes Called when the factory is started to get Diffie-Hellman generators and primes to use. Returns a dictionary mapping number of bits to lists of tuple of (generator, prime).
Method get​Private​Keys Called when the factory is started to get the private portions of the servers host keys. Returns a dictionary mapping SSH key types to twisted.conch.ssh.keys.Key objects.
Method get​Public​Keys Called when the factory is started to get the public portions of the servers host keys. Returns a dictionary mapping SSH key types to public key strings.
Method get​Service Return a class to use as a service for the given transport.
Method start​Factory Check for public and private keys.
Class Variable services Undocumented
Instance Variable primes Undocumented
Instance Variable private​Keys Undocumented
Instance Variable public​Keys Undocumented
Class Variable _log Undocumented

Inherited from Factory:

Class Method for​Protocol Create a factory for the given protocol.
Method do​Start Make sure startFactory is called.
Method do​Stop Make sure stopFactory is called.
Method log​Prefix Describe this factory for log messages.
Method stop​Factory This will be called before I stop listening on all Ports/Connectors.
Class Variable noisy Undocumented
Class Variable protocol Undocumented
Instance Variable num​Ports Undocumented
def buildProtocol(self, addr): (source)
Create an instance of the server side of the SSH protocol.
Parameters
addr:twisted.internet.interfaces.IAddress providerThe address at which the server will listen.
Returns
twisted.conch.ssh.transport.SSHServerTransportThe built transport.
def getDHPrime(self, bits): (source)
Return a tuple of (g, p) for a Diffe-Hellman process, with p being as close to bits bits as possible.
Parameters
bits:intUndocumented
Returns
tupleUndocumented
def getPrimes(self): (source)
Called when the factory is started to get Diffie-Hellman generators and primes to use. Returns a dictionary mapping number of bits to lists of tuple of (generator, prime).
Returns
dictUndocumented
def getPrivateKeys(self): (source)
Called when the factory is started to get the private portions of the servers host keys. Returns a dictionary mapping SSH key types to twisted.conch.ssh.keys.Key objects.
Returns
dictUndocumented
def getPublicKeys(self): (source)
Called when the factory is started to get the public portions of the servers host keys. Returns a dictionary mapping SSH key types to public key strings.
Returns
dictUndocumented
def getService(self, transport, service): (source)
Return a class to use as a service for the given transport.
Parameters
transport:transport.SSHServerTransportUndocumented
service:bytesUndocumented
Returns
subclass of service.SSHServiceUndocumented
def startFactory(self): (source)
Check for public and private keys.
services = (source)

Undocumented

primes = (source)

Undocumented

privateKeys = (source)

Undocumented

publicKeys = (source)

Undocumented

_log = (source)

Undocumented