
Osascript -e 'tell application "System Events" to sleep' Ssh Once logged in, type the following command:


You will need to enable SSH server on the target Mac beforehand for this to work, this can be done quickly through System Preferences > Network > Enable Remote Login. The first method assumes knowledge of SSH and the Terminal and is more advanced than the email method mentioned below.

The first method uses SSH and thus requires Terminal access, and the other uses just email which allows you to sleep a Mac with an iPhone or iPad just by sending a message from a verified email address. We’ll cover two methods to remotely put a Mac to sleep from anywhere.
