Skip to content
ScrubLogs

What a Private key looks like

A block of base64 between -----BEGIN … PRIVATE KEY----- and -----END … PRIVATE KEY----- lines, with RSA, EC, OPENSSH or nothing in between. Public keys and certificates use the same armour but say PUBLIC KEY or CERTIFICATE; those are safe to share.

A fake example, in the right format:

-----BEGIN PRIVATE KEY-----
MIIEvFAKEFAKEFAKEDEMOONLY…
-----END PRIVATE KEY-----

ScrubLogs replaces it with <PRIVATE_KEY_1>.

Why a leak is dangerous

With a TLS private key an attacker can impersonate your server; with an SSH key, log into every machine that trusts it; with a signing key, publish releases as you.

If yours leaked: rotate it

Redacting a copy doesn’t un-leak the original. If the real value was shared anywhere, replace it:

  1. Generate a new key pair. Don’t reuse the old one.
  2. Install the new key and remove the old public key everywhere it is trusted: authorized_keys, GitHub deploy keys, CI.
  3. For TLS, ask your certificate authority to revoke the old certificate and issue a new one.

Remove keys from your own log

Runs 100% in your browser. Nothing is uploaded.

Other secret types