I have a setup where I have an OSX machine as a server. OS is OSX El Capitan. One of the services it needs to have is sshd. The problem I am trying to solve is that when ever I reboot, I need to physically go to the server to log in to get sshd and remoting to start up. How do I get rid of this needless step? I have already enabled both Screen Sharing and Remote Login from Sharing in System Preferences. These settings only seems to affect what happens when at least one user is logged in.

I have figured that launchd LaunchDaemons, at least in principle, should start regardless of whether there are anybody actually logged in physically. I am not, however, sure whether sshd is set up as LaunchAgent or LaunchDaemon. Also, I suspect you need to create a separate user and group for sshd if you are going to run it as a LaunchDaemon.

One complicating factor is also FileVault. You could (although I won't if at all possible) set up one user to automatically login. It seems this cannot be done if you have enabled FileVault as it seems to encrypt home directories. This obviously complicates ssh logins. Decryption seems to require logging in physically.

Is this one of the cases that you really need OSX Server for?

migrated from serverfault.com Jan 11 '16 at 12:48

This question came from our site for system and network administrators.

  • 2
    Reason #1519485 why OSX is a very sub-optimal server operating system. (and that's coming from a guy that has used OSX as his primary workstation OS for 6 years). – EEAA Dec 29 '15 at 16:43

From your description it sounds like you need to unlock FileVault disk encryption to get the OS running.

If you want to reboot a machine remotely and have it automatically unlock the disk encryption, you need to use authenticated restart.

In short you need to issue the following command and provide the administrative password (usually twice: once for sudo, once for unlocking the / drive):

sudo fdesetup authrestart

after the command the machine will reboot without the need to enter the password. SSH and other deamons will be subsequently brough up.


SSH runs as a launch daemon on OS X, meaning that when it's turned on it's available whether or not anyone's logged in.

It sounds like you have FileVault turned on; if so, that prevents the OS from starting up until a user authenticates and unlocks the system volume. It's not just SSH, it's the entire OS.

Basically, FileVault does not allow unattended startup. If you need unattended startup, you need to turn off FileVault.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.