gitlab-sshd in GitLab Shell

gitlab-sshdgitlab-shell의 바이너리로서 지속적인 SSH 데몬으로 실행됩니다. GitLab SaaS에서는 OpenSSH를 대체하기 위해 설계되었으며, 결국 다른 클라우드 네이티브 환경에서도 사용될 예정입니다. sshd 프로세스를 실행하는 대신, 동일한 작업을 더 집중적으로 처리하는 gitlab-sshd 프로세스를 실행합니다.

sequenceDiagram participant Git on client participant GitLab SSHD participant Rails participant Gitaly participant Git on server Note left of Git on client: git fetch Git on client->>+GitLab SSHD: ssh git fetch-pack 요청 GitLab SSHD->>+Rails: GET /internal/api/authorized_keys?key=AAAA... Note right of Rails: 키 ID 조회 Rails-->>-GitLab SSHD: 200 OK, command="gitlab-shell upload-pack key_id=1" GitLab SSHD->>+Rails: GET /internal/api/allowed?action=upload_pack&key_id=1 Note right of Rails: 인증 확인 Rails-->>-GitLab SSHD: 200 OK, { gitaly: ... } GitLab SSHD->>+Gitaly: SSHService.SSHUploadPack 요청 Gitaly->>+Git on server: git upload-pack 요청 Note over Git on client,Git on server: Git 클라이언트와 서버 간 양방향 통신 Git on server-->>-Gitaly: git upload-pack 응답 Gitaly -->>-GitLab SSHD: SSHService.SSHUploadPack 응답 GitLab SSHD-->>-Git on client: ssh git fetch-pack 응답