An earthquake that hit southern Maine Tuesday night rattled nearby New England states as far as Connecticut, including the Boston area, but caused no injuries or apparent damage.