I've done this a number of times in the past as per Sliding Pillar's tool in the photo. It helps to leave the car in gear and one wheel on the ground, to fix the hub/stop it rotating. Needless to say use a good quality extension bar and allen key filling on the end of the socket.
I have heard of people using mole grips if one of the allen bolts gets rounded off (or is already rounded off, more likely).