Setting up SSH Server on Ubuntu 10.4 / Back | Track5

Posted on 2011-10-02
Last Modified: 2012-05-12
Hello everyone,
 I am trying to set up an SSH server on a machine running Back | Track5 over Ubuntu 10.4. I have generated the keys but when using the following command to see if the server is running I get no output:

root@bt:~/Desktop# netstat -ant | grep 22

Open in new window

The following command and output tells me that I am missing something:

root@bt:~/Desktop# /usr/sbin/sshd
Missing privilege separation directory: /var/run/ssh

Open in new window

Can someone tell me what this means and how to fix it?
Question by:BoxunloX
    LVL 16

    Assisted Solution

    I am a little surprised, that you have to generate the keys.

    Normally it should be enough to install the openssh-server
    ant to restart it with
    sudo /etc/init.d/ssh rest
    LVL 16

    Accepted Solution

    The error message tells you, that you configured sshd with a privilege sepration directory, but that you did not create this directory.

    Normally the ssh startupscript in
    /etc/init.d should take care of all this.
    LVL 21

    Assisted Solution

    It means just what it says, that /var/run/ssh does not exist.
    mkdir /var/run/ssh

    Open in new window

    LVL 1

    Author Comment

    Thanks Papertrip. You know a guy I used to work with had this as his email signature: "Its the simplest things that keep admins humble" true.

    Also, I just realized that the Offensive Security tutorial I was using was written for BT2........yeah I know....
    LVL 1

    Author Closing Comment

    Thanks guys. I didn't mean to waste your time on something simple.....I apologize.
    LVL 16

    Expert Comment

    You're welcome.

    I'm still surprised, that you had to create the directory manually.

    On my machine in my
    /etc/init.d/ssh file I can see clearly followign lines:
    check_privsep_dir() {
        # Create the PrivSep empty dir if necessary
        if [ ! -d /var/run/sshd ]; then
        mkdir /var/run/sshd
        chmod 0755 /var/run/sshd

    If due to special setup reasons you don't have (or can't use)  /etc/init.d/ssh, then I suggest,
    to create a similiar file.
    You could inspire yourself by looking at Ubuntu's one

    which is called in the start() section

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
    I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now