Is there a way to remotely restart Finder (or wake-up the desktop) from SSH?
This quits the Finder by sending it the "quit" AppleEvent, which is the same signal the system sends when logging out or restarting via the GUI:

osascript -e 'quit application "Finder"'


I (also) don't think quitting the Finder will fix the wake-from-sleep issue, though.