ssh does not start at boot  [Solved]

Message
Author
learning wizard

ssh does not start at boot

#1 Post by learning wizard »

HI there,
I am turning an old pc into a small home server using an antix 17 base 64 bit live persistent usb key. I installed openssh-server and tried to get it to run from the CC editing both the system tab (choose startup services) and the session tab (user desktop session), but still I have to start the service manually with sudo service ssh start. What am I missing?

User avatar
dolphin_oracle
Developer
Posts: 22052
Joined: Sun Dec 16, 2007 12:17 pm

Re: ssh does not start at boot

#2 Post by dolphin_oracle »

You may need to tell the init system to start the server at boot.

update-rc.d openssh-server defaults


sudo update-rc.d openssh-server defaults


should work on mx and antiX. I just installed on MX anyway and it went thru ok.

**edited command based on Head-on-a-stick's correction post**
**edit**
you might still need to activate the server the first time manually, but it should come up on its own on reboot.
Last edited by dolphin_oracle on Tue Feb 18, 2020 7:34 am, edited 2 times in total.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
Head_on_a_Stick
Posts: 919
Joined: Sun Mar 17, 2019 3:37 pm

Re: ssh does not start at boot

#3 Post by Head_on_a_Stick »

dolphin_oracle wrote: Tue Feb 18, 2020 6:45 am update-rc.d openssh-server defaults
The init script provided by the openssh-server package is called ssh and the update-rc.d(8) command doesn't seem to work (at least in the antiX-19 live environment), it just throws up insserv errors and doesn't activate the service (as shown by the symlinks in /etc/rc?.d/).

@OP: try

Code: Select all

sudo sysv-rc-conf ssh on
^ That seems to activate the service correctly (but I can't test with a reboot because I just have a live system).
mod note: Signature removed, please read the forum rules

learning wizard

Re: ssh does not start at boot

#4 Post by learning wizard »

thanks. I tried the solutions both from Head on a stick and dolphin oracle but neither seem to work. I tried them after starting ssh manually too.

Code: Select all

sudo update-rc.d openssh-server defaults
update-rc.d: error: initscript does not exist: /etc/init.d/openssh-server

User avatar
JayM
Posts: 6796
Joined: Tue Jan 08, 2019 3:47 am

Re: ssh does not start at boot  [Solved]

#5 Post by JayM »

How did you install openssh server?
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.

learning wizard

Re: ssh does not start at boot

#6 Post by learning wizard »

Code: Select all

sudo apt install openssh-server

learning wizard

Re: ssh does not start at boot

#7 Post by learning wizard »

eventually I installed the system on my old pc and from there ssh starts with no hassle at boot... maybe it's something dealing with persistency on the live system... should I consider as "solved" this tread?

User avatar
JayM
Posts: 6796
Joined: Tue Jan 08, 2019 3:47 am

Re: ssh does not start at boot

#8 Post by JayM »

You're trying to make openssh server start at boot on a live persistent USB not on an installed antiX system? Duh, so you said in your original post. I just didn't see that. (Never mind.)
:bagoverhead:
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.

User avatar
anticapitalista
Developer
Posts: 4282
Joined: Sat Jul 15, 2006 10:40 am

Re: ssh does not start at boot

#9 Post by anticapitalista »

Running live, try removing the

Code: Select all

disable=lx
entry at the boot menu
anticapitalista
Reg. linux user #395339.

Philosophers have interpreted the world in many ways; the point is to change it.

antiX with runit - lean and mean.
https://antixlinux.com

carolus
Posts: 14
Joined: Tue Feb 25, 2020 11:24 am

Re: ssh does not start at boot

#10 Post by carolus »

anticapitalista wrote: Wed Feb 19, 2020 7:13 am Running live, try removing the

Code: Select all

disable=lx
entry at the boot menu
It works for me (antiX 19 persistent USB), but why? Now I can start the boot process, then walk to my office and log in remotely.

I presume that the bootcode is there for a reason so that removing it will have some cost.

I tried searching for "disable" and for "lx" in the list of boot codes, but with no hits, at https://download.tuxfamily.org/antix/do ... xboot.html. Is there a more complete list of boot codes somewhere?

By the way, in my antiX the deleted code was not disable=lx but, if I remember correctly, disable=lxF.

EDIT 12/9/20: Sorry, I must have been careless in seaching for "disable". The answer is at the location referenced.

"disable=lx
Disable some startup services for faster booting and less RAM usage."

I presume lxF is a variant of lx.
Last edited by carolus on Wed Dec 09, 2020 11:37 am, edited 1 time in total.

Post Reply

Return to “antiX”