My secondhand NEMA17 motors (purchased from ebay) came with metal pulleys attached. No, not attached, they were on so tight they could have been welded there, or grown . No amount of yanking could get them off.
I eventually made one of a gear / pully remover, but could still not budge it. So I resorted to brute force - an anvil and chisel. Big hammer + hard chisel + anvil + gear = split gear. Yay! Or so I thought. The aggressive approach resulted in a bent shaft. That, and half the pulley was still hanging on it. I used the DIY gear puller to remove the remaining half pulley, which gave me an idea.
For the next motor, instead of dealing a full force blow to the pulley I instead tapped with a low - medium force 3 or 4 times at different locations. The impact loosened the bond between the shaft and the pulley, allowing me to use the pulley remover to extract the pulley with minimal effort and zero damage to the shaft.
Lucky I had 8 motors - it took 3 tries to figure it out resulting in one completely destroyed motor and 2 very slightly bent shafts. I only needed 5 for my Prusa, so all is good :-).