A Deno Deploy server for managing and syncing SSH public keys across homelab machines.
Run the following command to install the sync script and set up hourly cron:
# As root:
curl -fsSL https://ssh-keys.kye.dev/install | sh
# Or with sudo:
curl -fsSL https://ssh-keys.kye.dev/install | sudo shThis will:
- Download
sync.shto/usr/local/bin/sync-ssh-keys - Make it executable
- Add a cron job to run hourly
- Run an initial sync
This server provides a managed subset of SSH keys that can be synced to ~/.ssh/authorized_keys on target machines. Pre-existing keys are preserved, while managed keys (between marker comments) are kept in sync with this server.
The sync script manages a section of your ~/.ssh/authorized_keys file between markers based on the server host:
# BEGIN SSH-KEYS.KYE.DEV MANAGED KEYS
# Auto-synced from https://ssh-keys.kye.dev
# Last updated: ...
ssh-ed25519 AAAA... user@host
# END SSH-KEYS.KYE.DEV MANAGED KEYS
Any keys outside these markers are preserved and unaffected by syncs.
- Add
.pubfiles to thekeys/directory - Deploy the server
All machines will pick up the changes on their next hourly sync.
| Endpoint | Description |
|---|---|
/authorized_keys |
Returns all public keys from the keys/ directory |
/sync.sh |
Returns the sync script |
/install |
Returns an installer script for initial setup |
To manually trigger a sync without installing:
curl -fsSL https://ssh-keys.kye.dev/sync.sh | shTo update an existing install
curl -fsSL https://ssh-keys.kye.dev/reinstall | shcurl https://ssh-keys.kye.dev/authorized_keysdeno task devdeno task deploy