I would hit it with a hammer or mallet only as a last resort.
A proper socket with a breaker bar is what I would use. Pipe on the breaker bar to increase leveage.
Credit where due, the cassette tool with pin recommended by @
Metaluna is a great tool.
-Tim-