ssh starts too late

Jesse Smith jessefrgsmith at
Wed Feb 27 16:41:32 GMT 2019

>> I don’t know where I should file this as bug or if it’s not,
>> but openssh-server starts much too late.
>> I’m using sysvinit with non-parallel start everywhere, and
>> it’s started almost at the end of the boot, which hinders
>> debugging on remote systems if needed.
>> On the desktop I’m writing this on, ssh is S05ssh, second-
>> before-last of 20 S05 scripts which seem to be run ASCII-
>> betically, and followed by only a handful of scripts.
>> What can we do (ideally by an upload to Debian, so everyone
>> benefits from it) to make openssh-server start earlier?
>> It’s kind of a special case where the dependency-based boot
>> system isn’t really working…
> The only thing we can do is add more of Should-Start: into other
> scripts. It scales poorly, yeah.
> Also you (it does not seems to generalize) can add ssh into $remote_fs
> in /etc/insserv.conf and remove dependency on $remote_fs in ssh.
> And of course, you can rename /etc/init.d/ssh to /etc/init.d/SSH, and it
> will sort as you wish.
> Not that I like any of above, just ideas from the top of my head.
> Jesse, better ideas?

Not really, I think your ideas make sense. I'd only add that remote
services, like OpenSSH, tend to get started late on purpose. They need
to be activated after disks are mounted, the firewall rules are read,
the network is brought on-line, logging enabled, etc. My point being
that OpenSSH was likely set up to start toward the end of the boot
sequence by design. Typically remote debugging of the boot process is
likely to be done using logs or a VNC style connection rather than over
a live OpenSSH connection.

More information about the Debian-init-diversity mailing list