[Twisted-Python] Manhole - How to support
Chaz.
eprparadocs at gmail.com
Wed Jun 21 09:28:07 EDT 2006
I've built a 'ManholeFactory' to use with my application (see below).
When I try to connect to it via the 'manhole' client (under Linux) it
asks for Host, port, Name, Password, all of which I provide. But it gets
an error returned.
I was wondering if I need to do anything special (besides what my
manhole support does)?
Peace,
Chaz
(Please forgive the poor formatting...it is the email client doing it).
def ManholeFactory(namespace,**passwords) :
realm = manhole_ssh.TerminalRealm()
def getManhole(_): return manhole.Manhole(namespace)
realm.chainedProtocolFactory.protocolFactory = getManhole
p = portal.Portal(realm)
p.registerChecker(
checkers.InMemoryUsernamePasswordDatabaseDontUse(**passwords))
f = manhole_ssh.ConchFactory(p)
return f
class ManholeService(internet.TCPServer):
def __init__(self,port,namespace,**passwords):
internet.TCPServer.__init__(self,port,
ManholeFactory(namespace,**passwords))
ManholeSrv = ManholeService(ivars.ManholePort,
globals(),admin='whirlwind')
ManholeSrv.setServiceParent(srv)
More information about the Twisted-Python
mailing list