Disable automatic starting of sshd?

12,753

Solution 1

Remove the service from startup with:

sudo update-rc.d -f sshd remove

Reset it with:

sudo update-rc.d sshd defaults

Solution 2

You could install Boot-Up Manager. It is a GUI to enable or disable services on startup.

sudo apt-get install bum

It has to be run as root user.

sudo bum

enter image description here

Share:
12,753

Related videos on Youtube

blong
Author by

blong

Updated on September 18, 2022

Comments

  • blong
    blong over 1 year

    Possible Duplicate:
    How do I disable SSH from starting automatically?

    Simple question here; what's the correct way to stop the sshd service from starting when the OS boots ? I'm not sure if this answer is correct, so I'm hoping some guru(s) can help me out!

    What I'd like is a configuration that (after boot) allows me to start the service using sudo service ssh start when necessary.

    Version info:

    me@home:~$ ssh -V
    OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
    me@home:~$ lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 12.04.1 LTS
    Release:    12.04
    Codename:   precise
    
  • blong
    blong over 11 years
    I'm not exactly sure what you mean by remove and reset... Will I still be able to start the service manually? (i.e. with sudo service ssh start ) ?
  • blong
    blong over 11 years
    It looks like this isn't exactly the solution I'm looking for: me@home-computer:~$ sudo update-rc.d -f sshd remove Removing any system startup links for /etc/init.d/sshd ... me@home-computer:~$ sudo reboot When my computer restarted, I was able to ssh to localhost without starting the service: me@home-computer:~$ ssh me@localhost me@localhost's password: *** Welcome to Ubuntu 12.04... I'm looking for a way to simply stop the service from starting automatically. Any other thoughts?
  • wojox
    wojox over 11 years
    Did you try the answer you posted in your question? That is another option. Probably a good one.
  • blong
    blong over 11 years
    I didn't post an answer in my question, not sure what you mean?
  • here
    here over 9 years
    This does not work on ubuntu 14.04. See upstart and /etc/init/ssh.conf how-to-enable-or-disable-services