Host SSH Public Key via REST API

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Proposal

Currently GitLab exposes the the fingerprints for the SSH public keys on the instance configuration page (https://gitlab.example.com/help/instance_configuration). However, neither the fingerprints nor the host's public key is available via the REST API. This makes it difficult to build automation to handle public key rotations and additions. Furthermore, providing only the fingerprints limits the usefulness, as while they can be visually compared in interactive SSH sessions, they can not be used to populate known_hosts.

The host's SSH public key and fingerprints should be made available in a GitLab instance's REST API.

  • GitHub provides both in the public documentation and in the metadata API.
  • GitLab already exposes Gitaly's signing public key via the Web Commits API, but this seems unrelated to the keys used for git over SSH.
Edited by 🤖 GitLab Bot 🤖