The two dissimilar metals from the hub and knuckle tend to bond to each other making it a total pita to get them apart. Once you remove the 4 bolts that attach the hub to the knuckle, there is nothing else holding the two together, except corrosion. If I had to do it again, I would take it to a machine shop and press it apart, using the bolts that hold the two together as a place to press against, backed off maybe 4 turns from snug. In fact, I used a 5/8" drift to hammer my bolts to get them to push the hub away from the knuckle when I did mine, but one of them would not budge.
If you are replacing the whole knuckle, you can actually cut a line into the knuckle to get to the hub and if you are good with a sawzall or other reciprocating saw, you can get the cut line all the way to the hub. Then when you break through the knuckle to the hub, you can drive a wedge into the cut aluminum of the knuckle to release the pressure and remove the good hub to transplant to the new knuckle. I prepped mine with a generous coating of anti-seize where the metal bonds the two parts together to prevent a recurrence.