def makeFactory(configdict):
 pubkeyfile = os.path.join(_GAME_DIR, 'server', 'ssh-public.key')
 privkeyfile = os.path.join(_GAME_DIR, 'server', 'ssh-private.key')
 def chainProtocolFactory(username=None):
  return insults.ServerProtocol(configdict['protocolFactory'], *configdict.get('protocolConfigdict', (username,)), **configdict.get('protocolKwArgs', {}))
 rlm = PassAvatarIdTerminalRealm()
 rlm.transportFactory = TerminalSessionTransport_getPeer
 rlm.chainedProtocolFactory = chainProtocolFactory
 factory = ConchFactory(Portal(rlm))
 factory.sessionhandler = configdict['sessions']
 try:
  (publicKey, privateKey) = getKeyPair(pubkeyfile, privkeyfile)
  factory.publicKeys = {'ssh-rsa': publicKey}
  factory.privateKeys = {'ssh-rsa': privateKey}
 except Exception as err:
  print('getKeyPair error: {err}\n WARNING: Evennia could not auto-generate SSH keypair. Using conch default keys instead.\nIf this error persists, create {pub} and {priv} yourself using third-party tools.'.format(err=err, pub=pubkeyfile, priv=privkeyfile))
 factory.services = factory.services.copy()
 factory.services['ssh-userauth'] = ExtraInfoAuthServer
 factory.portal.registerChecker(PlayerDBPasswordChecker(factory))
 return factory

def makeFactory ( configdict ) : pubkeyfile = os . path . join ( _GAME_DIR , 'server' , 'ssh-public.key' ) privkeyfile = os . path . join ( _GAME_DIR , 'server' , 'ssh-private.key' ) def chainProtocolFactory ( username = None ) : return insults . ServerProtocol ( configdict [ 'protocolFactory' ] , * configdict . get ( 'protocolConfigdict' , ( username , ) ) , ** configdict . get ( 'protocolKwArgs' , { } ) ) rlm = PassAvatarIdTerminalRealm ( ) rlm . transportFactory = TerminalSessionTransport_getPeer rlm . chainedProtocolFactory = chainProtocolFactory factory = ConchFactory ( Portal ( rlm ) ) factory . sessionhandler = configdict [ 'sessions' ] try : ( publicKey , privateKey ) = getKeyPair ( pubkeyfile , privkeyfile ) factory . publicKeys = { 'ssh-rsa' : publicKey } factory . privateKeys = { 'ssh-rsa' : privateKey } except Exception as err : print ( 'getKeyPair error: {err}\n WARNING: Evennia could not auto-generate SSH keypair. Using conch default keys instead.\nIf this error persists, create {pub} and {priv} yourself using third-party tools.' . format ( err = err , pub = pubkeyfile , priv = privkeyfile ) ) factory . services = factory . services . copy ( ) factory . services [ 'ssh-userauth' ] = ExtraInfoAuthServer factory . portal . registerChecker ( PlayerDBPasswordChecker ( factory ) ) return factory
creates the ssh server factory .