service start-up configuration For SSH
To check whether a service is at start-up configuration we can use the following command
chkconfig –list sshd
This command will show the start-up configuration for the sshd service.
We can add any service at startup in many ways.
1. chkconfig sshd on
With this command the service will start only in that run level in which the OS is running now. Suppose the OS is running on run level 3, then this command add the sshd service at startup of run level 3.
2. chkconfig –level 35 sshd on
This command sets the sshd to start at run level 3 and 5.
3. We know that for every run level there are files. Suppose for run level 3 there is a file /etc/init.d/rc3.d .
Here we will find some files that starts their name with either K or S . Starting with K means the service is not at startup config. S means it will start automatically.
If the sshd service is not setup at run level 3, then we will find a file K20sshd . If we rename the file S20sshd, then sshd service will be set for run level 3.
mv K20sshd S20sshd
Wish to get any comments and better advice from you.
No comments:
Post a Comment