You've got a number of different options. How long do you want to take, and is there anything you wold like to see on the way? Of course, the first shoice is how do you want to leave Long Island? I've done a number of tours from Long Island to various parts of New England, and I can't really say I one way was better than the other.
One option is to go into Manhattan (I usually cheated and used the LIRR), cross the Geoge Washington Bridge, and ride up the Hudson River Valley. From Poughkeepsie you can hop onto Adventure Cycling's Atlantic Coast route and follow that to Nashua. Alternatively, you can stay in the Hudson River Valley past Albany and then cut through southern Vermont.
The other options all involve ferries. The Port Jefferson - Bridgeport ferry is my least favorite route due to poor cycling conditions around Bridgeport and New Haven, but I've used it a number of times. More often I've used the Orient Point - New London ferry since I enjoy the ride along the North Fork of Long Island, and love the New London / Groton / Mystic area. Another choice is to go from Montauk (I usually ride the North Fork and then cross at Shelter Island) to Block Island, and then from there to New London, Point Judith, or Newport. If you haven't yet been, Block Island is probably worth a trip. Make sure the ferries are operating during your tour dates, since some of them are seasonal. Once of the ferry, decide how close you want to go to Boston. In general I would try to avoid it, but for the easiest (flatest ride) stay close to Narangansett Bay (I prefer cycling on the east side of the Bay rather than the west side), and then thread your way between Worchester and Boston.
Sean