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?


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.


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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