Connect a Protocol to a ssh subsystem channel

def connectSubsystem(connection, protocol, subsystem):
    """Connect a Protocol to a ssh subsystem channel
    """
    deferred = connectSession(connection, protocol)
    @deferred.addCallback
    def requestSubsystem(session):
        return session.requestSubsystem(subsystem)
    return deferred