How to restart ssh deamon using upstart?

Asked by Kevin Weber

For the last umpteen years of my life, I've restarted the ssh daemon using:
sudo /etc/init.d/ssh restart

Just today, I got this error message:
"Rather than invoking init scripts through /etc/init.d/, use the service utility, e.g. service ssh restart

Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the restart utility, e.g. restart ssh"

... ok ...

So now I type:
sudo service ssh restart

and get:
restart: Unknown instance:

... ok ...

So now I type:
sudo restart ssh

and get:
restart: Unknown instance:

Can someone please tell me how to restart sshd now?

BTW, I'm running Ubuntu 10.04.

Thanks, K

Question information

English Edit question
upstart Edit question
No assignee Edit question
Solved by:
Kevin Weber
Last query:
Last reply:
Revision history for this message
Kevin Weber (kevintweber) said :

I have solved this problem.

Considering my remote machine lists uptime as 110 days, I figured that something in memory doesn't jive with the new upstart service.

So I rebooted the machine. Luckily, that went well.

And now "sudo restart ssh" works just fine.

I hope this can help others with the same problem.

- K