Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

lokiju

macrumors 6502
Original poster
Jun 10, 2008
275
1
Anyone know a way to wake a Mac from sleep via ssh/terminal?

I have a remote access app that has a bug right now that if the system goes to sleep it cannot wake it and their solution is to disable any sleep functions until they can figure out a fix.

While I did have the sleep functions disabled and just kept the screen brightness as low as possible and a screen saver set to kick in quickly for my iMac, since I reinstalled with ML the other day after my OEM hard drive died, I forgot to disable sleep.

Now I don't have physical access to my iMac and want to remotely access it so I need to figure out a way via ssh/terminal to kick it out of sleep preferably without rebooting it, though I can do so if there is no other option.

I know you can kick a Mac into sleep using the command

osascript -e 'tell application "System Events" to sleep'

But I want to accomplish the opposite result.

Any suggestions?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.