I would definitely get a longer connection if I could - JFK is very congested this time of year, a thunderstorm in the area and everything gets messed up for hours.
About the gates, I've never seen a 170 park at the Connection gates 23/25, they seem to get jetways.. usually at Terminal 2.
-A