Setting up SSH Server on Ubuntu 10.4 / Back | Track5

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?
Who is Participating?
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.
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
It means just what it says, that /var/run/ssh does not exist.
mkdir /var/run/ssh

Open in new window

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

BoxunloXAuthor Commented:
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....
BoxunloXAuthor Commented:
Thanks guys. I didn't mean to waste your time on something simple.....I apologize.
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.