Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

I am using Ubuntu 10.04 and have installed openssh-server.

How do I disable/enable it from being started at boot time?

Apparently it is not done with chkconfig

# chkconfig --list|grep -i ssh
ssh                       0:off  1:off  2:off  3:off  4:off  5:off  6:off
share|improve this question
up vote 3 down vote accepted

This should be enough, even if you're using upstart (dependency-base booting):

update-rc.d ssh enable # sets the default runlevels to on
update-rc.d ssh disable # sets all to off

I didn't know Ubuntu included chkconfig by default, that's pretty interesting - Debian doesn't.

See the comment below on how to remove startup links - I'm not sure that works when using upstart though.

share|improve this answer
and update-rc.d -f ssh remove – 3molo May 6 '11 at 10:50
Sorry, I forgot about removal. Are you sure this still works with upstart? – Eduardo Ivanec May 6 '11 at 10:54

There is not command I know of that can disable upstart jobs, but you can manually disable services by editing the corresponding Upstart configuration files. To stop SSHd from starting at boot time, comment out the line start on ... in /etc/init/ssh.conf as in:

description     "OpenSSH server"

#start on filesystem
stop on runlevel [!2345]
share|improve this answer

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.