Database / BetterDB Interview questions
What is the difference between the two SSH key sources in BetterDB Monitor?
"Paste key" submits the PEM key content inline along with the connection. It's stored encrypted at rest only when ENCRYPTION_KEY is set; otherwise it's stored in plaintext, just like connection passwords. This works everywhere, including managed or cloud deployments.
"Server file path" instead references a key that already lives on the monitor server's own filesystem. It requires the BETTERDB_SSH_KEY_DIR environment variable to be set, and the referenced path must resolve inside that directory – so the API can never be coerced into reading arbitrary files. Leaving BETTERDB_SSH_KEY_DIR unset disables this option entirely, leaving only inline pasted keys available.
More Related questions...