CoreKey Studio / Guides
Unlock FileVault on a Mac from your iPhone (Shortcuts only, no extra app)
When a Mac you left at home or in the office restarts, it stops at the FileVault screen. In that state, Screen Sharing and remote desktop apps cannot connect. Since macOS 26, the disk can be unlocked over SSH. This guide shows how to do it with nothing but the Shortcuts app that comes with the iPhone, based on a test we ran ourselves.
In short
- Mac: Apple silicon, macOS 26 or later, FileVault on, Remote Login on.
- iPhone: the built-in Shortcuts app is enough. No extra app.
- Effort: about five minutes to set up. After that, run the shortcut and enter your password.
- Caution: this method handles your Mac login password. You can store it inside the shortcut or have the shortcut ask for it on every run. Read “Things to be careful about” first.
- How it works
- What we tested
- Step 1: Prepare the Mac
- Step 2: Prepare the iPhone
- Step 3: Build the shortcut
- Step 4: Try it once at home
- Using it away from home
- Checking that it worked when you cannot see the screen
- Things to be careful about
- If it does not work
- For a planned restart, you can skip the FileVault screen
How it works
A Mac with FileVault on keeps its data volume locked after a restart. On macOS 26 or later with Remote Login turned on, the Mac still accepts SSH connections in that state. Send the login password over SSH and the volume unlocks.
Once it unlocks, the Mac closes the SSH connection and continues to the login window. From there, remote desktop apps connect as usual (we confirmed this with Jump Desktop).
What we tested
| Mac | Mac mini (Apple silicon), macOS 27.2, on Wi-Fi |
|---|---|
| iPhone | iOS 27, built-in Shortcuts app |
| Network | iPhone and Mac on the same home Wi-Fi, and iPhone on mobile data only, reaching the Mac through the way in at home |
| Variants | Password stored in the field, and Ask Each Time (both unlocked the Mac from the FileVault screen) |
| Date | November 21, 2026 |
Apple says this works on Apple silicon Macs running macOS 26 or later. We tested on macOS 27 and have not tested on macOS 26.
Step 1: Prepare the Mac
- Turn on Remote Login.
System Settings → General → Sharing → turn on Remote Login. - Note the user name and the Mac’s address on your home network.
Run these two lines in Terminal. The first prints the user name. The second prints an address such as192.168.x.x.id -un ipconfig getifaddr en0; ipconfig getifaddr en1 - Note the Mac’s host key fingerprints.
The iPhone will later ask whether the machine it reached is really your Mac. These are the values to compare. Run this in Terminal and keep the output as a note or a photo.for f in /etc/ssh/ssh_host_*_key.pub; do ssh-keygen -l -E md5 -f "$f"; done
The home address can change when the router hands out addresses again. Reserving a fixed address for the Mac in the router settings avoids that.
Step 2: Prepare the iPhone
Shortcuts needs permission to use SSH. The permission is off by default.
- Open Settings → Apps → Shortcuts → Advanced.
- Turn on Allow Running Scripts.
You can also go straight to Step 3. If the permission is off, the shortcut editor says “This action cannot be run because scripting actions are disabled.” Tap Open Settings below that message to reach the same page.
Step 3: Build the shortcut
- Open the Shortcuts app and tap “+” at the top right.
- On iOS 27, a screen that asks you to describe the shortcut appears first. It is not needed here. Tap Edit at the top right.
- Type “SSH” in the search field at the bottom and choose Run Script Over SSH.
- Fill in the fields.
Script true(a command that does nothing; the connection itself is what unlocks the Mac)Host The home address you noted in Step 1 Port 22(already filled in)User The user name you noted in Step 1 Authentication Password Password We recommend Ask Each Time, described just below. You can also type your Mac login password here and keep it stored. Input Leave as it is - Give the shortcut a clear name and close the editor.
Recommended: keep the password off the iPhone
Instead of a fixed password, the Password field can be set to Ask Each Time. The shortcut then stores no password and asks for it on every run.
- Tap the Password field. A bar of choices appears just below it.
- Swipe the bar to the left and tap Ask Each Time at the far end.
- When you run the shortcut, a password prompt appears. Enter your Mac login password and tap Done.
The prompt hides what you type. Our own first attempts were rejected because of input mistakes, so enter it slowly, one character at a time.
A Mac stopped at the FileVault screen unlocked with this variant and also with the password stored in the field. We tried both.
Step 4: Try it once at home
Try it at home before you rely on it elsewhere. There is a one-time confirmation on the first run, and it is safer to answer it while you are next to the Mac.
- Restart the Mac normally and wait until it stops at the password screen.
- Wait about 30 seconds. Right after the FileVault screen appears, the Mac is not on the network yet. In three tests, our Mac mini joined Wi-Fi 15 to 16 seconds after startup every time.
- Run the shortcut on the iPhone. If you chose Ask Each Time, enter the password now.
- The first time, an “Unknown Host” message appears and shows a fingerprint. If it matches one of the lines you noted in Step 1, tap Connect. If it does not match, tap Cancel.
- The Mac appears to start up again and then shows the login window. The disk is now unlocked.
The iPhone shows a failure message even when it worked. When the disk unlocks, the Mac closes the connection, so Shortcuts reports “SSH Password Authentication Failed.” If the Mac has moved on to the login window, it worked. For when you cannot see the screen, see the check below.
Using it away from home
The steps above assume the iPhone is on the same network as the Mac. To use the shortcut from elsewhere, you need a separate way into your home network.
One thing to keep in mind: while the Mac waits at the FileVault screen, a VPN app installed on that Mac is not running. You need another device at home that is always on to act as the way in.
We tested this with an Android phone left at home as a Tailscale subnet router. With Wi-Fi turned off on the iPhone, so that it was on mobile data only, running the shortcut unlocked a Mac stopped at the FileVault screen. The shortcut is the same one used at home, and the Host field still holds the Mac’s home address.
Checking that it worked when you cannot see the screen
Away from home you cannot see the Mac’s screen, and the shortcut shows a failure message even when it worked. This is the order we used to check.
- After the Mac restarts, wait about a minute to be safe.
- Run the shortcut. It says “SSH Password Authentication Failed” even when the disk unlocked.
- Wait about 30 seconds and run it again. If it finishes without an error this time, the disk is unlocked. Once unlocked, the Mac accepts the connection as ordinary SSH.
- Connect with your remote desktop app and log in at the login window.
Things to be careful about
- A password typed into the field stays inside the shortcut. Anyone holding your unlocked iPhone can run it. Always use a passcode on the iPhone, and do not share the shortcut with anyone. If you do not want it stored, use Ask Each Time.
- Allow Running Scripts is a safety setting. Do not install shortcuts from sources you do not know.
- Always compare the fingerprint. If you accept an unknown host without checking, you may send your password to a different machine.
- Stop if it warns that the fingerprint has changed. Shortcuts saves the fingerprint from the first connection. If it later says the server’s fingerprint is different from the saved one, do not continue until you know why.
- Do not keep retrying when it fails. Check one cause at a time, then try again.
If it does not work
| What happens | What to check |
|---|---|
| It cannot connect | Was it right after the restart? Wait 30 seconds and try again. Also check that the iPhone is on your home Wi-Fi and that the Mac’s address has not changed. |
| It says scripting actions are disabled | Allow Running Scripts from Step 2 is off. |
| The fingerprint differs from your note | The shortcut reached a different machine. Do not connect. Check the address in the Host field. |
| It says “SSH Password Authentication Failed” | Look at the Mac first. If it has moved on to the login window, it worked and you can ignore the message. If it is still at the FileVault screen, the password did not match. Enter it again, one character at a time. |
| The Mac stays at the FileVault screen | Check that Remote Login is on, and that the user name and password are correct. |
For a planned restart, you can skip the FileVault screen
When you restart the Mac yourself, there is a way to skip the FileVault screen once. Run this in Terminal on the Mac. It asks for your password, restarts, and goes straight to the login window with the disk unlocked.
sudo fdesetup authrestartIt does not help with restarts you did not plan, such as a power cut or an automatic update. The shortcut on this page is for those.
References
- Apple Platform Security (FileVault and SSH)
- Jeff Geerling: You can finally manage Macs with FileVault remotely in Tahoe
man apple_ssh_and_filevaultin Terminal on the Mac
This guide was written by CoreKey Studio LLC from tests on our own devices. If you find a mistake, please tell us at info@tomesaki.com.