LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Stop ssh service on bootup (https://www.linuxquestions.org/questions/linux-newbie-8/stop-ssh-service-on-bootup-4175445922/)

ESWBitto 01-16-2013 03:32 PM

Stop ssh service on bootup
 
Distro is Centos 6


I have been doing a lot of looking and googling on how to stop the service for ssh....How exactly do I do that? I want it to not even run if the server reboots.

druuna 01-16-2013 03:46 PM

Have a look at chkconfig (15.5. chkconfig)

This should work:
Code:

chkconfig sshd off
To check:
Code:

chkconfig sshd  --list
To turn back on:
Code:

chkconfig sshd on
The above enables/disables the startup at boot, the service command starts/checks/stops the sshd service:
Code:

service sshd start
service sshd status
service sshd stop


Kustom42 01-16-2013 03:47 PM

When doing your searching use the key term of "chkconfig"

Scripts are started in the redhat world based upon symbolic links to the run level directories, the chkconfig daemon builds and removes these symlinks for you. In the old days you had to do it manually.


So you could do:

Code:

/sbin/chkconfig sshd off
And it would be turned off.


Check out http://www.linuxjournal.com/article/4445 and http://www.linuxjournal.com/article/1274

ESWBitto 01-16-2013 03:54 PM

OH geez....Simple enough. I thought I would have to edit some script file. Thank You!


All times are GMT -5. The time now is 04:23 PM.