Datatypes

OpenSSH private key

ID openssh_private_key

DatatypeNot PIIidentifierDraft

This record is a draft: it has not been reviewed yet and may be incomplete or wrong. Do not rely on it for compliance decisions. Help improve it (see CONTRIBUTING.md).

Private key in the OpenSSH key format (openssh-key-v1): a Base64 block between the lines -----BEGIN OPENSSH PRIVATE KEY----- and -----END OPENSSH PRIVATE KEY-----, which ssh-keygen writes. Keys in the PEM formats of OpenSSL (RSA PRIVATE KEY, EC PRIVATE KEY, PRIVATE KEY) are the datatype x509_private_key.

Parent datatype
Private key or wallet seed (generic) private_key
Categories
Secrets and credentials (passwords, keys, tokens), Cryptographic identifiers
Countries
Global (not tied to a country)
Languages
Common to most languages
Quality
70/100 · missing: examples, mapping (Wikidata, Schema.org, ...), translation
Metacrafter rules
no detection rule yet
Supported by tools
Cloudflare DLP, GitGuardian, GitHub secret scanning, Gitleaks, pyWhat

Regular expression

^-----BEGIN OPENSSH PRIVATE KEY-----[\s\S]+-----END OPENSSH PRIVATE KEY-----$

Python re syntax.

Examples

ValueDescription
-----BEGIN OPENSSH PRIVATE KEY----- invalidHeader line without the key and the footer

Sources

Use this record