According to a convenient nuclear effects calculator I found[1], 20MT at 5km and an optimal burst height will generate over 40psi of overpressure. The fireball itself will reach about 4km in radius. According to another site[2], 20psi is enough to severely damage or destroy heavily built concrete buildings, and the maximum wind speed at 40psi will be greater than the speed of sound. For comparison, 3psi is enough to destroy a normal house.
Indeed; if you really want to survive such effects, you need to do what they did in Cheyenne Mountain: build a tunnel through a mountain and install your blast doors etc. perpendicular to it some distance from the entrances; Wikipedia says it'll handle 600 psi. One of the reasons we deemphasized it and went to Boeing E-4s (747 command posts) in the early '70s was that we judged the Soviets had a good chance of landing serious warheads at both ends of the tunnel at the same time, which would exceed its design limits.
Tom Clancey described these missiles as having the mission to: "turn Cheyenne Mountain into Cheyenne Lake."
The novel "Arc Light" also has a description (probably not that accurate) of a limited strike by Russia against the US that includes destruction of the bunkers at Cheyenne Mountain, Raven Rock Mountain and Omaha:
Probably not that accurate indeed: several Amazon reviewers noted his descriptions of "vicious" recoil from M16 rifles (!!!). If he got something so widely, if not infamously, well known so wrong, why would we expect anything else to be correct?
On the other hand, an early strike at both ends of the tunnel is very different from eroding it over some period of time (has to be some separation to avoid fratricide); if the construction was done well enough, the latter might have provided more time for NORAD to transmit additional data about the attack in progress.
So, yeah, 5km counts as "close range".
[1] http://www.fourmilab.ch/cgi-bin/Bombcalc?yield=20&yunit=...
[2] http://www.atomicarchive.com/Effects/effects4.shtml