Connect a Protocol to a ssh exec session

def connectExec(connection, protocol, commandLine):
    """Connect a Protocol to a ssh exec session
    """
    deferred = connectSession(connection, protocol)
    @deferred.addCallback
    def requestSubsystem(session):
        return session.requestExec(commandLine)
    return deferred