Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I tried to restart the ssh server on my ubuntu box, I got

me@me-one:~$ service ssh restart
restart: Rejected send message, 1 matched rules; type="method_call", sender=":1.63" (uid=1000 pid=3354 comm="restart ssh ") interface="com.ubuntu.Upstart0_6.Job" member="Restart" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")

I realized that I hadn't sudo-ed

me@me-one:~$ sudo service ssh restart
ssh start/running, process 3386

Why didn't the first attempt throw an error like Permission denied or something similar. Am I overriding the error when running as root and implicitly ignoring the warning/error? Or is it just bad programming by the openssh developers?

share|improve this question
Reported the bug here: – kenorb Oct 1 '12 at 8:58
up vote 12 down vote accepted

One person's "bad programming" may be another person's "it's working as intended".

It's true that you need root priveleges to restart, start, stop etc and you are getting this message because you don't have those privileges. But I agree that it would be nice if the message you got when you tried to do so without root privileges was more helpful.

You may want to check if bugs already exist in launchpad about this (presumably under upstart) and if not, report it. It's the sort of thing, though, where I'd be fairly sure you wouldn't be the first person to notice it since it's so common. Either way, bug research can be rewarding.

share|improve this answer

As far as i now, to start or stop a service you must have Super User prievilages. You must prepend sudo before the command.

To start,

sudo service ssh start

To stop,

sudo service ssh stop

To restart

sudo service ssh restart

To check status,

sudo service ssh status


  • sudo allows a permitted user to execute a command as the superuser.
share|improve this answer
I've already posted in my question that using sudo solved my problem. What are you trying to say? – Lelouch Lamperouge Mar 1 '12 at 19:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.