Banging on the ceiling may startle squirrels temporarily, but it's hardly a permanent solution. Squirrels are adaptable and may return after a short time. It's best to focus on using humane deterrents and sealing entry points to keep squirrels out of your living space.