The easiest way to do a remote shutdown (or place any other command) is to have an ssh key for the root user. Here’s how to make one.

After this you can log in without password, so the task is easy:

ssh root@<ip adress or alias of the server> shutdown -h now

would shut down the remote box immidiately. Furthermore, you can actually run any command on the remote machine in the same way.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.