Remotely Sleep a Mac with SSH

por | 12 febrero, 2014
Comando: 

pmset sleepnow


    • Use Terminal and SSH to the target Mac, be sure to specify the appropriate user name and IP address:

ssh [email protected]

    • 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.