nimarty/hackypi

Configure OpenSSH as global systemd service

Opened this issue · 0 comments

Suggestion from @khronozz :
Most of the services used on the Hacky Pi image are with SystemD. But there is still one important
service that needs to be ported : the OpenSSH server. When completely disabling the SysVinit
functionalities, the OpenSSH server is ported to SystemD, but there is an issue. The SSH daemon
(sshd) is run in a new service for every new connection. The sshd service from SystemD becomes
instance based and by default, there is not a ”sshd.service” file in the /etc/systemd/system folder
but a ”sshd@.service”, which is a SystemD service template. If we want to restart/reload the SSH
server because we changed the configuration files, we need to restart every sshd instance. There
isn’t a global OpenSSH server but individual SSH instances. Therefore, a sshd.service file needs
to be enabled at the boot of the Raspberry Pi.