Starting sshd: Missing privilege separation directory: /var/empty/sshd

The SSHD service while restarting, looks for the “/var/empty/sshd/etc” directory which contains a symlink to the ‘localtime’ file. If the file doesn’t exist, it results in a “cannot create symbolic link `/var/empty/sshd/etc’: No such file or directory” error message.

The complete error message is as follows:

-bash-3.2# service sshd restart 
cp: cannot create symbolic link `/var/empty/sshd/etc': 
No such file or directory 
Starting sshd: Missing privilege separation: /var/empty/sshd [FAILED]

The solution is to create the “/var/empty/sshd/etc” directory and then create a symlink for localtime file.

# mkdir /var/empty/sshd/etc
# cd /var/empty/sshd/etc
# ln -s /etc/localtime localtime

Once done, you should be able to restart the sshd service.

This entry was posted on Sunday, December 5th, 2010 and is filed under Linux Administration. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

4 Responses to “Starting sshd: Missing privilege separation directory: /var/empty/sshd”

  1. KK

    Thanks man,

    But where does this problem come from? One day sshd was working, the other found this error.
    Also, UsePAM was set to yes. I had to disable this in order to start sshd.

  2. admin

    It happens when the SSH package is updated, really shouldn’t be disturbing the previous configuration but it does it sometimes.

  3. cybermoose

    I know I’m very late with the comment but I found it just now and really can’t help it (and I know that that’s not the point). Anyway, you wrote:

    “SSH to your server and execute:”

    If sshd isn’t working, how do you propose to ssh to the server? 😛

  4. admin

    This issue does let you SSH in until you restart the SSHD service which fails (then you can’t ssh in) due to the issue mentioned in the post. And this solution is also helpful for those working on the host servers (which hosts vps’s) to fix such issues on VPS’s.