This is the sort of wrench I have in mind:
In the Wikipedia article (Socket Wrench) displaying this image, it is described as a spark plug wrench, but there are wrenches of this style in many other sizes, and for many other purposes - anywhere one has no access from the side and a long bolt or stem preventing even deep 'conventional' sockets (having a square socket for a drive on the other end) reaching the nut.
The image itself is labeled "box spanner", but if I search for that at Home Depot, Harbor Freight, etc., I get back the type of wrench that has a closed, 12-point ring on the end of a handle, and if I search for "spark plug wrench", I get tools specifically for that purpose. I suspect that "box spanner" is British usage; is there a term in American usage that picks out just this style of wrench, regardless of its purpose?
Update: Thanks to everyone for your help and advice. As it happens, I was able to make a suitable tool by cutting six notches in the end of a steel pipe. While this was not as good as a real wrench, it was sufficient to grab the points of the nut and stop it from turning, in the manner of a basket strainer wrench (as suggeseted by Jimmy James.).