-
how to make sshd start automatically at boot time?
From reading the posts in this forum, it seems that
when you do a hard disk install Knoppix will ask you if you want to:
Start a Mail Server
Start sshd at boot?
Start Samba at boot
Start KDE at boot?
I did not see any of this.
Now that my hard disk install is done, how do I make sshd start automatically at boot time?
Thanks.
-
Senior Member
registered user
There is a file prepared for that:
Run it on boot isn't wise, because you may boot sometimes without networking.
There are several runlevels, by convention:
Code:
S SingleUser rescue mode (or Superuser?)
1 Single user without networking
2 Multi user wo. net
3 Multiuser + networking (here we need ssh)
4 ? reserved for special purpose
5 Multiuser + net + X11 (here too)
6 Reboot
...
For every level there is a rcX.d - directory, usually in /etc or in a subdir of /etc
(Replace the X with S, 1...6)
If you switch the runlevel, for the level you leave its kill-Scripts are called, and for the new, its Start-scripts are called.
Surprisingly, both scripts, the kill script and the start scripts are identical!
How's that?
Well - they are called with a parameter, which they evaluate.
Code:
fooManShoe -start
fooManShoe -stop
If you switch to runlevel 3 or 5, you need the start-script to be called, and if you leave them, the Kill-scripts should be called.
Therefore you create a symbolic link from the /etc/init.d/ssh to /etc/rc3.d/S44ssh and to rc5 accordingly.
The number - 44 in my example, decides the order in which the scripts are called. Lower numbers first.
I don't know if ssh needs a kill-script, if yes, you would use /etc/rc3.d/K44ssh too.
There is a graphical tool, which does this in a userfriendly way.
SysVinit or something similiar.
In either way, you have to be root to do this.
-
Senior Member
registered user
Well I run sshd on boot on all of my boxes.
Code:
update-rc.d ssh defaults
That ougtta do it.
-
Senior Member
registered user
ah, that looks much simpler
-
Senior Member
registered user
On my LAN in my classroom, I put
Code:
/etc/init.d/ssh -start
at the end of /etc/bootmisc.sh on all my PCs and all is well!
Good Luck,
AJG
-
I did
update-rc.d ssh defaults
and that works.
Now sshd runs at boot every time.
Thanks to all of you.
-
Senior Member
registered user
Now to reverse your changes (or halt other startup scripts in /etc/init.d) do:
Code:
update-rc.d -f <service> remove
Example:
Code:
update-rc.d -f ssh remove
-
ok, cool
so can I use
update-rc.d apache defaults
to start apache at boot?
and
update-rc.d mysql defaults
to start mysql at boot?
-
Senior Member
registered user

Originally Posted by
lothario
ok, cool
so can I use
update-rc.d apache defaults
to start apache at boot?
and
update-rc.d mysql defaults
to start mysql at boot?
Yep. Anything that lives in /etc/init.d can be set to run from any run level you like w/ update-rc.d.
Similar Threads
-
By Mr.45er in forum General Support
Replies: 2
Last Post: 10-06-2004, 01:21 AM
-
By Zero_1984 in forum Hdd Install / Debian / Apt
Replies: 6
Last Post: 09-28-2004, 04:57 AM
-
By paradox87 in forum Hdd Install / Debian / Apt
Replies: 2
Last Post: 06-16-2004, 11:38 PM
-
By lothario in forum General Support
Replies: 6
Last Post: 04-29-2004, 09:47 AM
-
By hokiegal99 in forum General Support
Replies: 1
Last Post: 12-11-2003, 01:23 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

GIGABYTE A520M DS3H AC AMD AM4 Motherboard mATX
$59.99

Intel H310 LGA1151 8-9th Gen DDR4 M.2 NVMe mATX Motherboard IO Shield Battery
$54.99

ASUS PRIME Z490-V Motherboard Intel Z490 10th gen DDR4 LGA 1200 ATX w/ IO Shield
$84.99

Intel H81 Motherboard M.2 NVMe LGA 1150 mATX w/ IO Shield (Random Slot Color)
$29.90

GIGABYTE B365 HD3 LGA1151 Intel 9th Gen motherboard
$59.99

ASUS PRIME B360M-C MicroATX Intel LGA1151 DDR4 HDMI VGA USB RJ-45 Audio
$34.99

ASUS TUF GAMING B550-PLUS WIFI II AM4 AMD B550 ATX AMD Motherboard
$90.99

ASRock B650M Pro RS WiFi AM5 AMD B650 SATA 6Gb/s Micro ATX Motherboard
$101.99

GIGABYTE Z790 AORUS ELITE AX LGA 1700 Intel Z790 ATX Motherboard with DDR5
$189.99

ASUS ROG STRIX X870E-E GAMING WIFI
$289.99