I'd budget three days for that ride if you're fully loaded. If you're going ultralight and peddling 100 miles a day, two days is doable.
I haven't done it in over 25 years, but did several rides from NYC (starting in Queens) to Boston. The main route was through Long Island to the Orient Point ferry at the end of Long Island, crossing to New London CT, along the coast to Providence RI then north to Boston. All arriving in Boston on the third day. That's around 200 miles fully loaded.
There's also a 2nd Long Island ferry from Port Jefferson NY to Bridgeport CT. If you're doing the ferry route, I'd go to Orient Point though.
I've also gone completely along the coast up Cape Cod and then over to Boston by ferry, which is a longer route.
If you're intent on avoiding the Long Island to the ferry route, I'd consider the suggestion about following the Hudson further north before heading west (this might add a day). The southern coast of Connecticut (especially the western half) has a lot of traffic, although it does go through some nice scenic areas.
Hosteling International has hostels in both
Manhattan and
Boston, which would be cheaper than a hotel. You can make reservations. I don't know if you need to be a member or not, check their site. Once you select your route you can Google for campgrounds or hotels around you're anticipated overnight stays.