def openShell(self, transport):
        protocol = EchoProtocol()
        # Connect the new protocol to the transport and the transport
        # to the new protocol so they can communicate in both directions.
        protocol.makeConnection(transport)
        transport.makeConnection(session.wrapProtocol(protocol))
Use our protocol as shell session.
dataset/ETHPy150Open twisted/twisted/docs/conch/examples/sshsimpleserver.py/ExampleSession.openShell