How do I stop/start ssh in version 11.10? I've tried
/etc/init.d/ssh restart sudo service ssh restart sudo restart ssh
I get errors every time... arrrr!
It should be as simple as (tested on a fresh install with openssh-server)
As it leverages upstart, this is The Best Way™ to do it, rather than using /etc/init.d/ssh,
(I would recommend
If those commands don't work, you are probably either experiencing a bug or have tinkered too far with your system, in which case you at least know what the problem isn't.
First check to see if sshd is running using the following:
You should see something like:
If you do not see a line for
If you do see that line, next run this:
This should print the process id of sshd, so in this case you should see:
If the contents of sshd.pid does not match the process id of the running instance of sshd then something has restarted it incorrectly. But whatever the details you find here should put you on the right track. Either it's crashing, being restarted incorrectly, or never being started in the first place.
I think that the Unknown instance error is because SSH is not running.
To see if the SSH daemon is running or not, you should see something like:
In any case, just try any of these:
The second "error" is not an error. It work just as well but tells you about another way of stopping ssh. As the message indications, you can use