Hacker News 中文摘要

RSS订阅

苹果:SSH与FileVault功能 -- Apple: SSH and FileVault

文章摘要

当启用FileVault时,数据卷在启动期间和启动后会被锁定,直到使用密码验证账户。macOS的OpenSSH配置文件和账户设置存储在数据卷中,因此在解锁前无法使用常规认证方法和shell访问。然而,启用远程登录后,仍可通过SSH进行密码认证,从而远程解锁数据卷。解锁后,macOS会短暂断开SSH连接以完成数据卷挂载和相关服务启动,之后SSH和其他服务将完全可用。

文章总结

标题:苹果SSH与FileVault

主要内容

当FileVault启用时,数据卷在启动过程中及启动后会被锁定,直到使用密码验证账户后才能解锁。macOS版本的OpenSSH将其所有配置文件(包括系统范围和每个账户的配置)存储在数据卷中。因此,在数据卷锁定期间,通常配置的认证方法和shell访问不可用。然而,如果启用了远程登录功能,即使在这种情况下,仍然可以通过SSH进行密码认证。这种方法可以用于通过网络远程解锁数据卷。但解锁后,macOS会短暂断开SSH连接,以完成数据卷的挂载并启动依赖于此的其他服务。之后,SSH及其他已启用的服务将完全可用。

历史

通过SSH解锁数据卷的功能首次出现在macOS 26 Tahoe版本中。

相关参考

sshd(8)

评论总结

评论主要围绕macOS中FileVault与SSH远程解锁功能的改进展开,观点多样,既有积极评价,也有质疑和担忧。

积极观点: 1. 远程解锁功能的便利性:多位评论者认为这一改进非常实用,特别是对于远程管理Mac服务器的用户。例如,reader9274表示:“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”(“所以你是说我现在可以拥有一个完全远程的Mac mini服务器,在断电后自动重启,而无需连接键盘物理登录?太棒了!”)。nozzlegear也提到:“This is a welcome change though; I don't usually shut my Mac down but there have been a few times where I'm working away from home and need to SSH into my Mac only to remember that I'd installed some major update the night before.”(“这是一个受欢迎的改变;我通常不关闭我的Mac,但有几次我在外工作时需要SSH进入我的Mac,却想起前一天晚上安装了重大更新。”)

  1. 对企业用户的价值:georgeburdell指出,这一改进对企业用户尤其重要,解决了FileVault在自动化应用中的障碍:“Biggest change for corporate non-personal Mac usage. Mac Minis are actually fairly good value and good quality for miscellaneous automation purposes. We started switching over to them at work, and the FileVault issue described here was actually one of the big things holding us back.”(“这是企业非个人Mac使用的最大变化。Mac Mini在自动化应用中具有相当好的性价比和质量。我们开始在工作中转向使用它们,而这里描述的FileVault问题实际上是我们之前的一大障碍。”)

质疑与担忧: 1. 潜在的安全风险:mmaunder简短地指出:“There’s an attack vector in there somewhere.”(“这里面存在某种攻击向量。”)sugarpimpdorsey则对技术细节提出疑问:“I'm curious - if the OpenSSH config files are not available - how do they start sshd? If the system keys are encrypted, how do they accept connections? There's a surprising lack of detail here.”(“我很好奇——如果OpenSSH配置文件不可用,他们如何启动sshd?如果系统密钥被加密,他们如何接受连接?这里缺乏细节令人惊讶。”)

  1. 技术实现的潜在问题:Cu3PO42提到可能存在与图形会话类似的竞争条件问题:“Specifically, if you restart and opt to restart apps, they can come up before all volumes have been decrypted and mounted. If your shell is on one such volume, your terminal emulator may fail to start, for example.”(“具体来说,如果你重启并选择重启应用程序,它们可能会在所有卷被解密和挂载之前启动。如果你的shell位于这样一个卷上,你的终端模拟器可能会启动失败。”)

其他观点: 1. 与Linux系统的对比:pfexec提醒,Linux系统早已通过TPM实现自动解锁功能:“Friendly reminder that you've been able to automatically unlock fully-encrypted Linux systems via TPM for years since it was added to systemd...”(“友好提醒,自从systemd加入TPM以来,你已经能够通过TPM自动解锁完全加密的Linux系统多年了……”)

  1. 系统卷加密的讨论:ninkendo推测系统卷可能未加密:“I guess this means the system volume is not encrypted with FileVault? It makes total sense, since it’s supposed to be sealed, read-only data, and identical for every macOS installation.”(“我猜这意味着系统卷没有用FileVault加密?这完全合理,因为它应该是密封的、只读的数据,并且对于每个macOS安装都是相同的。”)

总结:评论者对macOS中FileVault与SSH远程解锁功能的改进普遍持积极态度,认为其提升了远程管理的便利性,特别是对企业用户。然而,也有评论者对其安全性、技术细节和潜在问题表示担忧,并与其他操作系统(如Linux)进行了对比。