Files
apps/sync-github-sshkeys
2025-09-11 00:41:39 +05:30
..
2025-09-11 00:41:39 +05:30
2025-09-11 00:37:18 +05:30

Sync GitHub Team SSH Keys to Root

This tool automatically syncs the SSH public keys of all members of a GitHub team into the root users ~/.ssh/authorized_keys.
It is useful for managing server access in organizations where team membership on GitHub defines who should have SSH access.


Features

  • Syncs SSH keys from a GitHub team into roots authorized keys
  • Backs up old keys automatically
  • Installs as a cronjob (runs hourly by default)
  • Interactive setup: select your organization and team from GitHub
  • Stores your GitHub token securely in /root/.github-token

Requirements


Quick Install

Run this as root:

wget -O sync-github-sshkeys.sh https://raw.githubusercontent.com/excloud-in/examples/main/sync-github-sshkeys/sync-github-sshkeys.sh && bash sync-github-sshkeys.sh