To Telnet, SSH, Share, or VNC to a Mac at a remote location as it now stands, the target machine must be awake, and its router (linking the internet to the machine) must be properly port forwarded to the target for that protocol. If the machine is asleep, you won’t get in because its ethernet or WiFi connection won’t be “listening”.
The EnergySaver Preference Pane’ s help says this about waking a sleeping machine: (where I assume that selecting one of these means that the machine’s internet or modem connection doesn’t sleep when the rest of the machine does).
But note that SSH, for example, will not wake the machine it targets because to do so requires a Wake On LAN packet. A WoL packet is fairly straight-forward (though not for me - I don’t know how to send a packet): it must include anywhere within it hexadecimal FF six times in a row, followed by the target’s MAC address 16 times (not sure about spacing between characters). The easiest way to do that is to send a broadcast from the target LAN’s router, since only the target machine (with the correct MAC address) will respond anyway. I haven’t tried this (because I don’t know how to do it), but I understand that Macs can be wakened this way.
Does anyone know how to do this from a script, i.e., send a WoL packet to a particular port on an AirPort Extreme that is set up to forward the packet to a sleeping Mac inside the LAN?
I’d appreciate some unequivocal “NOs” from readers who read this but don’t have a clue how to do it rather than no answer at all.