The correct way is to pull the shafts and get them pressed out/in.

Another way is to knock them out with a BFH and use a lug nut backwards with a stack of flat washers to pull the new ones in. This way may not be so nice for the bearings and may over stress the lugs. Do at your own risk.

I have heard of custom presses to change them in place but never seen one.