SSH problem after update

Setting up openssh-server (1:5.3p1-3ubuntu7) ... 
Creating SSH2 RSA key; this may take some time ... 
Creating SSH2 DSA key; this may take some time ... 
start: Job failed to start

Can't initialize ssh, already tried reinstall.

SSH server is started manually via /etc/init.d/ssh start

netstat -nlp shows that no services are running at TCP port 22


Not sure that my solution is right. But if you just want to start your SSH server and then solve your problem later, here is my fast solution:

start-stop-daemon --start --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- -p 22

if then you will see error:

Missing privilege separation directory: /var/run/sshd

then just create that missing directory, and try above start-stop-daemon command again:

mkdir /var/run/sshd
chmod 0755 /var/run/sshd

that helped me to start my sshd daemon.


I had the same problem that sshd would not start because of error.
It showed that there was no directory /var/run/sshd.

ll  /var/run

showed a link to /run.
But on my system /run runs on ramdisk.
So I deleted the link and created the directories /var/run and /var/run/sshd. Now the sshd starts normally and I am able to reach my system over ssh again.