First and foremost, not all kegs are the same, so this answer can vary. Many used ball lock corny kegs feature a rubber top handle section, where the rubber is cut out on both sides for the gas and ball lock posts. When the ball lock disconnects are attached to these posts, they will extend up past the top of the rubber top about another 1-1/8".
So if you are tight on space and trying to figure out if the keg you have will fit when the disconnects with lines are attached, make sure you take these measurements into consideration.
A standard ball lock disconnect is about 2-1/4" tall.
If measuring form the top of the post, the disconnect will attach and cover about 7/8" of the post. So measure 1-3/8" up from the top of the post.
When in doubt, its always best to give yourself an extra inch or so of height. Note that these measurements are absolute minimun requirements.