def connectShell(connection, protocol):
    """Connect a Protocol to a ssh shell session
    """
    deferred = connectSession(connection, protocol)
    @deferred.addCallback
    def requestSubsystem(session):
        return session.requestShell()
    return deferred
Connect a Protocol to a ssh shell session