Linux – SSH problem after ubuntu update

linuxsshUbuntu

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 inicialize ssh, already tried reinstall.

netstat -tlnp shows that no service is running on tcp port 22

Best Answer

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.