Sometimes it is necessary to restart a Mac remotely, especially when there's no direct access to the GUI. A quick way to do that is by logging on to the server with an admin account using SSH (assuming ssh is permitted) and running the following command:
sudo /sbin/shutdown -r now
shutdown: will shutdown the system
-r: stands for "restart"
now: do not wait for timeout and restart the system right away