Sshd_config Include directive

On Debian and Fedora the default sshd_config contains a line like Include /etc/ssh/sshd_config.d/*.conf which allows doing local SSHd configuration without risk of causing a conflict with package manager when the default file is updated. I would like similar to exist on SailfishOS, where I would configure something like:

# Includes public keys in logins

PermitRootLogin no
PasswordAuthentication no
AuthenticationMethods publickey

I am aware of the developer settings having a toggle to allow/deny ssh, but I would find only allowing SSH keys more practical solution than having to visit the settings to toggle it whenever I have need for ssh/scp.

Additionally at least Fedora seems to do its upstream configuration in a file called /etc/ssh/sshd_config.d/50-redhat.conf, I guess they are avoiding a conflict with upstream that way.

  • SailfishOS (Verla)
  • SONY Xperia 10 II