[systemd-devel] Possible confusion with socket activation and daemon own configuration

David Timothy Strauss david at davidstrauss.net
Thu Sep 10 13:37:11 PDT 2015


On Tue, Sep 8, 2015 at 10:48 AM Simon McVittie <
simon.mcvittie at collabora.co.uk> wrote:

> As far as I understand it, this duplication is present to give the
> sysadmin a choice between two ways to run sshd, depending on this
> particular ssh server's requirements.
>
> If ssh access is frequently used or needs to work quickly (for instance
> as the primary way to log in and fix things), enabling sshd.service
> means it will start "eagerly", on boot. Debian and its derivatives
> enable this by default (if sshd is installed).
>
> If ssh access is infrequently used, a sysadmin can disable sshd.service
> and enable sshd.socket instead. That means sshd will be started
> on-demand, which will take a bit longer (particularly if the reason to
> log in is that the server has hit performance problems), but reduces
> resource consumption until then. This would be appropriate if the reason
> for providing ssh access is as a rarely-used "developer console"
> analogous to Android's adb, for instance.
>

Starting SSH eagerly or lazily is an independent decision from using socket
activation. The lazy use case is clear, but you can use socket activation
for eager service startup by simply enabling the service and socket (if the
service doesn't already require the socket).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150910/36b1655a/attachment.html>


More information about the systemd-devel mailing list