Allow inclusion of user sshd configuration files in docker
Currently, docker version of gitlab ships with its own static sshd config file in /assets/sshd_config
, which cannot be easily modified.
I propose the inclusion of the following:
# Include optional user configuration
Include /etc/gitlab/sshd_config.d/*.conf
As the folder /etc/gitlab
is usually mounted as a volume, this gives access to custom configuration to the user. If the folder does not exist, nothing happens.
Use case: I wanted to offer ssh certificates and this was the only way i found, as I have to manually create the certificates and place them in the volume so they survive container resets. Giving access to custom sshd configuration seems to be the easiest solution and can also be used for other purposes.
Example of my /etc/gitlab/sshd_config.d
contents:
HostCertificate /etc/gitlab/ssh_host_rsa_key.crt
HostCertificate /etc/gitlab/ssh_host_ecdsa_key.crt
HostCertificate /etc/gitlab/ssh_host_ed25519_key.crt