If the Mac still fully functional, and remote login is enabled and you have another Mac/PC/Phone that is able to do remote secure shell (SSH) connection, then you could log on to your Mac with your username and password and controll your Mac as if you started the Terminal app on your Mac. As I've experienced with my issue, it may diverges you from your real problem (or causes more if you not carefull enough but if you won't type “sudo” mindlessly, your system is atleast safe—even if your work is not since everything you type is done immediately in the way you typed it in).
To connect remotely:
- On a Mac or with Linux or other UNIX alike:
- Start Terminal
- Type in “ssh [username]@[machine]”
- On any other devices:
They usually don't support the ssh command natively, unless you specifically install a port on it. Usually they ask the host and username separately, but if it is not, you either be asked for a username, or you can provide in a [username]@[machine] form in the host field rather than [machine] only.
Where
- [username] is your short username given at first turning on your Mac, or creating a new user on your Mac. I don't know a more userfriendly way to determine it than type “whoami” (without quotes) in the Terminal app.
- [machine] is the name of your Mac that is identified by a human readable form, and can be seen or changed in the Preferences -> Sharing section, top of screen. (The name you should use here is under the text input, in the text.) It also tells you the full command how you could sign in, if you select Remote Login from the right list, if it is enabled, tough for me it uses my IP address.
Bracket ([]) and quotes (“”) are only for separating the text/input, they are not needed.
The least you could do then is type one of the following commands:
- To restart: “sudo shutdown -r now”
- To shutdown: “sudo shutdown -h now”
This way you do a safe shutdown/restart.
Ps.: Nothing personal, I've just wanted this to be fully explained.