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
| Value | Description |
|---|---|
| -----BEGIN OPENSSH PRIVATE KEY----- invalid | Header line without the key and the footer |
Sources
- doc: https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.key
- other: https://github.com/openssh/openssh-portable/blob/master/sshkey.c
Use this record
- Page URL:
https://registry.apicrafter.io/datatype/openssh_private_key - JSON: API v1 · legacy shape (used by metacrafter) · Markdown (for LLMs)
- Improve it: edit
data/datatypes/any/secrets/openssh_private_key.yamlon GitHub