You have a lot of options if you want to do this ride. If you take the coastal route it will be much busier and, in my opinion, less fun. I recommend the route taken by the Tim Johnson Ride on Washington. It follows some of the suggestions above but cuts through Hartford, CT. There's no reason to ride directly through Hartford, they were doing events so needed larger towns to stop in. Best place to find the route maps is on RideWithGPS.com, use the keyword "TJROW" in your search and you'll see routes between NY and Boston.
Coming out of NY it's the Hudson River Greenway, cut over to Broadway to cross the Harlem River, up into Van Cortlandt Park and pick up the Old Putnam trail there. The trail name changes but it will take you north for quite a ways. I cut across near Yorktown to start heading east. Beautiful towns in Connecticut but short, steep hills.