How to restart ssh deamon using upstart?

Asked by Kevin Weber on 2011-08-18

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

Language:
English Edit question
Status:
Solved
For:
upstart Edit question
Assignee:
No assignee Edit question
Solved by:
Kevin Weber
Solved:
2011-08-19
Last query:
2011-08-19
Last reply:
Kevin Weber (kevintweber) said : #1

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