Quote:
Originally Posted by linuxrndblog
run following command:
chkconfig sshd on (for on boot time start)
chkconfig sshd off (for on boot time stop)
|
Those commands are for red hat based systems, for example CentOS. In debian based systems the equivalent would be:
Code:
update-rc.d ssh defaults
update-rc.d ssh remove
For manual starting/stopping, with upstart based systems (newer ubuntus for example) you can use
Code:
service ssh start/stop/restart/reload
before upstart the "correct" way at least in ubuntu was
Code:
invoke-rc.d ssh start/stop/restart/reload
But invoking the script directly works across all variants:
Code:
sh /etc/init.d/ssh start/stop/restart/reload