Skip to content
Cryptography
ASD ISMISM-1449

ASD ISM 1449 Protect SSH private keys with passwords or encryption

What it says

SSH private keys are protected with a password or a key encryption key.

Quoted as published. Everything else on this page is written by Control Stack.

In plain English

Protect every SSH private key with a password (passphrase) or a key encryption key, so a copied key file cannot be used by itself.

SSH private keys must be protected with a password or a key encryption key, so a copy of the key file cannot be used without it. The password protecting a key is often called a passphrase. A key encryption key is a separate key used to encrypt the private key, such as one held by a hardware security module or secrets management solution. This covers keys people use to log on and keys automated jobs use. The control sets no password length, but the ISM's password strength controls apply.

Why it matters

An unprotected private key file works for whoever copies it, from a lost laptop, a backup or a compromised server, and opens every system that trusts the matching public key. With a password or key encryption key, the copied file alone is not enough.

How to implement

  1. Find every SSH private key used to log on.

    Search the workstations of everyone who uses SSH, servers, automation hosts, build pipelines and code repositories for private key files. Test each by loading it with an empty passphrase: a key that loads is unprotected, even on an encrypted disk. A secrets scanner can find key files across many systems.

  2. Require a password on every key people use.

    The ISM's password strength controls apply, including the minimum length for your system's classification (ISM-1559 to ISM-1561), no complexity rules (ISM-2080) and no common or compromised passwords (ISM-2078). Keys on a hardware token unlocked by a PIN (a numeric password), or in a password manager unlocked by a password, also meet this.

  3. Protect keys for automated jobs with a key encryption key.

    Jobs cannot type a passphrase, so keep each job's key in a secrets management solution that stores it encrypted and releases it only to that job (ISM-2142), or in a hardware security module. Where the tooling allows, prefer short-lived SSH certificates for each run (ISM-2141), with the key still protected.

  4. Replace unprotected keys rather than only adding a passphrase.

    Copies of the old file may remain in backups or on other machines, so generate a new protected key pair, install its public key wherever the old one was trusted and remove the old one. ISM-1590 and ISM-2144 require credentials found stored in the clear to be changed.

Keep it running

Include SSH private keys in the scans for credentials stored in the clear that ISM-1875 requires, and replace any unprotected key found (ISM-1590, ISM-2144). Recheck when new automation, build pipelines or administrator workstations are set up.

Evidence and audit

  1. Check 1 of 3What an auditor asks for

    Ask for

    A scan for SSH private key files across workstations, servers, build systems and code repositories, run by someone other than the key owners.

    Look at

    Whether each key used for logons loads with an empty passphrase.

    Good evidence

    No key used for logons loads without its password, PIN or key encryption key.

  2. Check 2 of 3What an auditor asks for

    Ask for

    The storage and retrieval set-up for the keys of a sample of automated jobs.

    Look at

    Where each key is kept, what encrypts it and what can retrieve it.

    Good evidence

    Each sampled job's key is held encrypted under a key encryption key and released only to that job, or kept inside a hardware security module, with no plain copy on disk.

  3. Check 3 of 3What an auditor asks for

    Ask for

    A demonstration of a person using their SSH key in a new session with nothing cached.

    Look at

    Whether a passphrase or PIN is needed before the key works.

    Good evidence

    The key cannot be used until its passphrase or PIN is entered.

Mappings

Closest match in ISO/IEC 27001: A.5.17, Authentication information, which this control partially meets.

ISO 27001

ISO/IEC 27001: 2 mappings

  • A.5.17Authentication informationPartially meets
  • A.8.24Use of cryptographyPartially meets

Mappings show how controls relate across frameworks. They do not imply full equivalence or certification.