GitLab

Why we implemented our own SSHD solution

Aug 17, 2022Igor Drozdov
Why we implemented our own SSHD solution
SummaryAI, from the source post

This post details the implementation of a custom SSH daemon (`gitlab-sshd`) to replace the previous OpenSSH Server and GitLab Shell setup. Key technical contributions include: enabling PROXY protocol support for Group IP address restriction, implementing graceful shutdown for Kubernetes compatibility, adding Prometheus metrics and profiling, reducing resource usage and attack surface, and simplifying the overall architecture. The post also highlights challenges encountered, such as memory consumption issues, limitations in the `golang.org/x/crypto` library (leading to a fork), and the need to re-implement OpenSSH options. The incremental rollout strategy is emphasized as a key lesson learned.

More from the SSH Key Management and Authentication trail