News for hackers. Stuff that matters.
Re:Apple: SSH and FileVault by reader9274 on Thursday September 18, 2025 @04:47PM (#45294811)
So you're saying i can now have a fully remote mac mini server with auto-reboot on power outage without the need to physically log in with a keyboard attached? Awesome
Re:Apple: SSH and FileVault by firecall on Thursday September 18, 2025 @08:05PM (#45296499)
I'm hoping that's the case!

Having to physically login to a remote Mac that has FieVault enabled to get it online after a power outage is not ideal!

So will I be able to actually remote into the GUI now after a reboot?

I've looking at getting a Mac mini for my homelab again, but thinking I'll need one of those remote enable KVM devices!

Re:Apple: SSH and FileVault by varenc on Thursday September 18, 2025 @05:25PM (#45295194)
You can also do this:

   sudo fdesetup authrestart -delayminutes -1

which will make the computer auto login to the chosen account on next reboot, without having to type in a password. Only lasts once. Has obvious security downsides though but that might be fine.
Re:Apple: SSH and FileVault by firecall on Thursday September 18, 2025 @08:06PM (#45296504)
I was also aware of this - but I dont want my Mac to actually auto login, for obvious reasons!

I just want me to able to remotely login!

Re:Apple: SSH and FileVault by varenc on Friday September 19, 2025 @04:16PM (#45306037)
[delayed]
Re:Apple: SSH and FileVault by eastbound on Thursday September 18, 2025 @05:42PM (#45295374)
But then you could just disable FileVault?
Re:Apple: SSH and FileVault by derefr on Thursday September 18, 2025 @06:38PM (#45295885)
I think the point of this technique is to be able to leave the machine locked on cold boot, but to be able to e.g. unlock it, put it to sleep, and go on vacation; and then, if you need to remotely reboot it, you can reboot it in such a way that it stays unlocked on next boot, rather than reverting to locked.
Re:Apple: SSH and FileVault by kkylin on Thursday September 18, 2025 @07:10PM (#45296130)
Generally I have used fdesetup to do remote OS upgrades: do this just before an OS upgrade so that on reboot I can still log in.
Re:Apple: SSH and FileVault by anyfoo on Thursday September 18, 2025 @07:13PM (#45296150)
It's still a little bit like putting your jewelry in a safe, and leaving the key on top of the safe.
Re:Apple: SSH and FileVault by derefr on Thursday September 18, 2025 @08:50PM (#45296758)
I mean, I assume you'd set the unlock-on-reboot flag, and then immediately reboot — at which point the unlock-on-reboot flag gets automatically unset.

So, sure, it's a bit like leaving the key on top of the safe... while you have the safe open. Which isn't all that odd.

Re:Apple: SSH and FileVault by anyfoo on Thursday September 18, 2025 @11:18PM (#45297607)
No, the scenario was power outage at an unknown time in the future, not immediate reboot.
Re:Apple: SSH and FileVault by BHSPitMonkey on Thursday September 18, 2025 @10:30PM (#45297354)
When it comes to disk encryption, at least in the home, the threat model isn't somebody sitting around in your home finding a way to exfiltrate the currently-unlocked filesystem; It's someone taking the computer or the drive with them and leaving.

In your analogy, the key atop the vault vanishes as soon as the vault is moved from its location (loses power).

Re:Apple: SSH and FileVault by anyfoo on Thursday September 18, 2025 @11:18PM (#45297610)
If that was the case (maybe it is, I don’t know), then how does the proposed solution help against power outages, which was asked for?
Re:Apple: SSH and FileVault by avianlyric on Friday September 19, 2025 @04:17AM (#45299241)
That wasn’t what was asked for. The original reason given was to require a password on cold boot, but not require a password when rebooting e.g. for an OS update
Re:Apple: SSH and FileVault by anyfoo on Saturday September 20, 2025 @02:13AM (#45310889)
Well, you've asked me to quote in another subthread, I did. Since I don't fully get what you're referring to now, can you please quote?
Re:Apple: SSH and FileVault by patrakov on Friday September 19, 2025 @01:02AM (#45298122)
It makes sense temporarily. You can always move the key to your pocket later if nobody steals it.
Re:Apple: SSH and FileVault by anyfoo on Friday September 19, 2025 @03:31AM (#45298907)
Oh yeah, I get it. Just pointing out what this is doing, and why you should probably not always do this, for example.
Re:Apple: SSH and FileVault by johncolanduoni on Thursday September 18, 2025 @07:38PM (#45296333)
This only puts the key in NVRAM until the next restart - so if you run it just before you restart an attacker would have to happen to grab the device in those few minutes.
Re:Apple: SSH and FileVault by anyfoo on Thursday September 18, 2025 @11:20PM (#45297622)
The stated problem was power outages. I did not verify the syntax of the proposed solution, but -1 looks like it disables the delay. So, indefinitely until the next reboot? Which, if the key is indeed saved in NVRAM (I don’t know), means someone can take the machine and have it unlocked at their destination.
Re:Apple: SSH and FileVault by johncolanduoni on Thursday September 18, 2025 @11:59PM (#45297804)
It used to be NVRAM at least, but that was before the integrated Secure Enclave. Now it could in theory store it there and only unlock if the boot chain is validated (similar to the automatic TPM-based unlock that Windows uses by default).
Re:Apple: SSH and FileVault by anyfoo on Friday September 19, 2025 @03:33AM (#45298916)
Right, but my point was, if the idea is to do this to have an automatic unlock on power outages (and if this persists across power outages), it’s not just a few minutes, it’s indefinitely.
Re:Apple: SSH and FileVault by avianlyric on Friday September 19, 2025 @04:20AM (#45299265)
You’re going to have to quote that the stated problem was power outages. The first comment in this thread was taking about how the linked article solves the power outage problem.

But the sub-thread about using the existing utils is only for solving the unlock on reboot problem, and explicitly not solving the cold boot unlock problem.

Re:Apple: SSH and FileVault by anyfoo on Saturday September 20, 2025 @02:12AM (#45310884)
First comment:

> So you're saying i can now have a fully remote mac mini server with auto-reboot on power outage without the need to physically log ...

Reply:

> You can also do this: [...] -delayminutes -1 [...] which will make the computer auto login to the chosen account on next reboot, without having to type in a password. Only lasts once. Has obvious security downsides though but that might be fine.

Even though I haven't checked, the "-delayminutes -1" very much sounds to me like it disables the automated reboot, so it waits until the machine reboots for other reasons. Given this and given that it is a direct reply, I personally took it as another solution to the power outage problem, the "reboot" in question actually being a cold boot due to the power outage.

Note that I haven't verified whether this works after removing power.

Re:Apple: SSH and FileVault by Reason077 on Thursday September 18, 2025 @06:29PM (#45295803)
You’ve always been able to do this, just not in combination with FileVault.
Re:Apple: SSH and FileVault by tristansokol on Thursday September 18, 2025 @06:43PM (#45295918)
How would you automatically login via ssh?
Re:Apple: SSH and FileVault by SXX on Friday September 19, 2025 @08:09AM (#45300701)
autossh + sshpass. Work perfectly.
Re:Apple: SSH and FileVault by reader9274 on Friday September 19, 2025 @01:48AM (#45298327)
Just tested it and it works flawlessly!

1. Enable: General > Sharing > Remote Management

2. After reboot, when trying to SSH you get this message:

"This system is locked. To unlock it, use a local account name and password. Once successfully unlocked, you will be able to connect normally."

3. Once you successfully ssh, the ssh connection is closed, and this message is shown:

"System successfully unlocked. You may now use SSH to authenticate normally."

4. You have to re-ssh and you're in!

Re:Apple: SSH and FileVault by SXX on Friday September 19, 2025 @08:11AM (#45300726)
One question for you or anyone who tried it. SSH host (mac) key pre disk unlock is randomly generated and persistent?
Re:Apple: SSH and FileVault by lxgr on Friday September 19, 2025 @08:35AM (#45300955)
I'd be surprised if it were a different key from the regular host key.

Most SSH clients I know show a big and often non-overridable warning in case of a changed host key and don't allow (at least not TOFU-style) trusting two keys.

Re:Apple: SSH and FileVault by SXX on Friday September 19, 2025 @08:47AM (#45301073)

  > Most SSH clients I know show a big and often non-overridable warning in case of a changed host key and don't allow (at least not TOFU-style) trusting two keys.
You can solve this with HostKeyAlias, but yeah I doubt Apple would do this. Considering other comments mentioning "just SSHing after reboot" it's certainly the same host key.

  https://stackoverflow.com/questions/733753/how-to-handle-ssh-host-key-verification-with-2-different-hosts-on-the-same-but
PS: Another option obviously UserKnownHostsFile, but I would better keep single known hosts file.
Re:Apple: SSH and FileVault by lxgr on Friday September 19, 2025 @08:52AM (#45301126)
Wow, TIL about HostKeyAlias and CheckHostIP. Especially the latter sounds super useful when it comes to frequently changing private IPs. Thank you!
Re:Apple: SSH and FileVault by nazarewk on Friday September 19, 2025 @10:27AM (#45302048)
I actually turned it on after the update with General > Sharing > Remote Login.

It's worth noting I had to disable and re-enable (I had it enabled to begin with) this option for SSH to start working.

Remote Management option didn't change anything for me and is currently turned off.

Re:Apple: SSH and FileVault by reader9274 on Sunday September 21, 2025 @01:01PM (#45324534)
Ah, I use Remote Management because I also do screen sharing on this mac mini from time to time
Re:Apple: SSH and FileVault by kylehotchkiss on Friday September 19, 2025 @08:22PM (#45308439)
If you had it on prior to the MacOS update with FileVault off, MacOS automatically enabled FileVault and didn't flip the switch with SSH to support this.

So now I have a Mac mini that I have to unmount and connect to a screen to get working again. blerg

Re:Apple: SSH and FileVault by alerighi on Friday September 19, 2025 @03:24AM (#45298862)
I remember the time one of my coworkers accidentally enabled failevault on our CI machine, I had to take it out of the rack, dust it off, connect it to a monitor and keyboard, just to login and disable it. Good thing they made it can be unlocked with SSH, so in case it happens another time I can just do it remotely.
Re:Apple: SSH and FileVault by drusklo on Friday September 19, 2025 @03:47AM (#45298996)
Honest question; why would you want a server with mac os? I am asking because I thought about getting a mac mini for that purpose, because the hardware is great, but running mac os vs linux is what is throwing me off.
Re:Apple: SSH and FileVault by mvanbaak on Friday September 19, 2025 @04:01AM (#45299109)
A couple of reasons for me to run it: - time machine - photos.app backup (have photos.app download local copies of your iCloud photos library, backup the photos.app files) - build server for ios/ipados/macos apps
Re:Apple: SSH and FileVault by rendx on Friday September 19, 2025 @04:20AM (#45299266)
I use linux SMB targets for Time Machine and PhotoSync and it works just fine. There's also icloudpd, but it requires ADP off.
Re:Apple: SSH and FileVault by dbdr on Friday September 19, 2025 @03:51AM (#45299024)
Have you considered https://asahilinux.org/ ?
Re:Apple: SSH and FileVault by happymellon on Friday September 19, 2025 @03:55AM (#45299061)
It sounds like they already are, and questioning what benefits having a remote MacOS server would give them.

Time Machine backups could be one reason?

Re:Apple: SSH and FileVault by rendx on Friday September 19, 2025 @04:28AM (#45299312)
Time Machine does not require Mac. You can point it to e.g. a SMB share as destination as well.
Re:Apple: SSH and FileVault by rollcat on Friday September 19, 2025 @05:07AM (#45299542)
Unfortunately they only support M1/M2 (last time I checked - hardstuck). It would be a great choice to repurpose existing hardware, but I wouldn't go shopping for Asahi specifically.
Re:Apple: SSH and FileVault by fredsted on Friday September 19, 2025 @04:03AM (#45299128)
I mean, why not? There's few drawbacks. Low power usage, high performance, stable OS that can about the same software Linux can. You get the added benefit of interfacing with Apple's ecosystem and iCloud, so you could e.g. back up your Photos database remotely. You can remote in and have a fully featured desktop available anywhere.
Re:Apple: SSH and FileVault by drexlspivey on Friday September 19, 2025 @04:30AM (#45299320)
I use it as a plex server and it can handle anything you throw at it. Previously plex was running on the synology NAS itself and it would choke with a couple concurrent transcodes
Re:Apple: SSH and FileVault by rollcat on Friday September 19, 2025 @05:00AM (#45299496)
I'm browsing for something to replace my M1 mini, possibly a non-Mac. With Tahoe around the corner, running a Mac headless seems to be the best option to cope with the redesign.
Re:Apple: SSH and FileVault by egorfine on Friday September 19, 2025 @05:13AM (#45299586)
I run a render farm on macs. I'm getting so much more performance from a basic Mac Mini that it's not even funny.

Also a bit of CI on these because why not.

Managing remote macOS instances is a constant PITA, including, but not limited to ssh access quirks.

Re:Apple: SSH and FileVault by BatteryMountain on Friday September 19, 2025 @05:43AM (#45299754)
Build servers.

Currently, someone has to head down to the basement and turn the mac on manually if it dies/crashes for any reason. Huge pain in the psu.

Re:Apple: SSH and FileVault by lxgr on Friday September 19, 2025 @08:37AM (#45300974)
A Mac mini (or studio, or however it's called these days) is supposedly one of the more affordable ways to self-host LLMs these days.

Being able to resume such a server after a power outage when traveling sounds great.

Re:Apple: SSH and FileVault by amelius on Friday September 19, 2025 @04:55AM (#45299462)
Until Apple triggers something that needs user input, such as an AppleID prompt. Then it's back to the data center ...
Re:Apple: SSH and FileVault by SXX on Friday September 19, 2025 @08:04AM (#45300646)
What's wrong with just connecting to mini over VNC? You can even firewall it off and tunnel VNC connection over SSH, or tailscale / zerotier.

I dont think there is any single action you cant perform on Mini remoty. Once it's unlocked that is.

Re:Apple: SSH and FileVault by amelius on Friday September 19, 2025 @10:20AM (#45301982)
Maybe actions like "Please enter your AppleID", or a popup showing on your physical screen saying "system has to restart now", which doesn't show in VNC. In any case, you don't want this in a server because these are usually used over SSH and those types of popup will simply not be seen. Also, servers are usually administrated using scripting and those popups wouldn't work anyway.
Re:Apple: SSH and FileVault by naikrovek on Friday September 19, 2025 @07:56AM (#45300581)
maybe. but until then...
Re:Apple: SSH and FileVault by SXX on Friday September 19, 2025 @08:00AM (#45300622)
Yeah this is really cool. Before I had to setup hardware KVM for managing Mac build server. Extra $50 for SiSpeed NanoKVM is okay, but then KVM is effectively MiTM that can siphon the password for disk encryption.

Having it work with just properly encrypted SSH is really welcome change.

Re:Apple: SSH and FileVault by ubermonkey on Friday September 19, 2025 @08:28AM (#45300893)
Oh, this is nice indeed.