Remotely Restart an Encrypted Mac
Disclaimer: This is an old post. Content may be out of date.
The fdesetup
utility can be used to remotely restart a Mac without needing physical in-person keyboard access to unlock FileVault on the next boot only:
fdesetup authrestart
You will be prompted for the password of a FileVault-enabled user account, or the FileVault recovery key.
After restarting, macOS will allow remote access via SSH immediately, without the usual need to unlock FileVault by logging in as a FileVault-enabled user sitting in front of the Mac in question. This is particularly useful for headless Mac mini servers, so you don’t need to connect a monitor, keyboard, and mouse every single time they restart due to a software update, for example.
Bonus - you can do this on Windows as well, with PowerShell:
PowerShell -Command "Suspend-BitLocker -MountPoint "C:" -RebootCount 1"
shutdown /r /f