Can not login to server: “Server is going down” on ssh login

I was not able to log into an old server. Directly after connecting over ssh, I got a “Server is going down” message.

Solution is to reboot into safe mode, remove /etc/nologin, do a sync, and properly shutdown the machine.