Starter nuts with headers?

I'm replacing my positive battery cable and I have headers. How do you guys get to the nuts. I think one is 3/8 and the other is 9/16. What tool do you use?