Comando: pmset sleepnow
- Use Terminal and SSH to the target Mac, be sure to specify the appropriate user name and IP address:
- Once logged in, type the following command:
osascript -e 'tell application "System Events" to sleep'
There is no warning or hesitation, the target Mac immediately goes to sleep and the SSH connection will die as a result.