Skip to content
Cryptography
ASD ISMISM-0489

ASD ISM 0489 Four-hour cached SSH private key lifetime and screen locks

What it says

When SSH-agent or similar key caching applications are used, cached private keys have a maximum lifetime of four hours and, where applicable, screen locks are used on workstations and servers.

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

In plain English

When SSH-agent or similar key caching is used, cached private keys must expire within four hours, and screen locks must be used on workstations and servers where applicable.

Where SSH-agent or a similar key caching application is used, cached private keys must have a maximum lifetime of four hours, and screen locks must be used on workstations and servers where applicable. These applications hold unlocked private keys in memory so SSH connections can be made without re-entering the passphrase. The lifetime runs from when a key is loaded, not from its last use. 'Where applicable' covers machines where an agent runs in a desktop, local console or remote desktop session; ISM-2012 sets how their screen locks work.

Why it matters

Once a key is cached, anyone who can use the session, at an unlocked screen or through malicious code running as the user, can use the key without its passphrase. Expiring cached keys within four hours and locking unattended screens limits that exposure.

How to implement

  1. Find where key caching applications run.

    Use endpoint management or process inventory to find SSH agents on workstations and servers, including agents built into operating systems and password managers with an SSH agent feature.

  2. Set a four-hour maximum lifetime through managed settings.

    Start the agent with a default lifetime (ssh-agent -t 4h) and have clients add keys with the same limit (AddKeysToAgent 4h); for other agents, use their maximum lifetime setting. A longer lifetime given when a key is added overrides the agent's default, so check scripts and shortcuts for one.

  3. Replace agents that cannot expire keys.

    Some agents keep keys until removed, even after a restart. Turn those off or swap them for one with a lifetime setting.

  4. Lock screens wherever cached keys could be reached.

    Identify the workstations and servers where an agent runs in a desktop, local console or remote desktop session, and configure their screen locks as ISM-2012 requires, including activation after at most 15 minutes of inactivity.

Keep it running

Recheck the lifetime setting when operating systems, SSH clients or password managers with agent features are upgraded or replaced, since defaults can change. Add new workstation and server builds to the managed agent and screen lock settings before they are used.

Evidence and audit

  1. Check 1 of 3What an auditor asks for

    Ask for

    The managed agent configuration and an endpoint inventory of machines running key caching applications.

    Look at

    The lifetime each configuration sets, and whether every machine in the inventory receives it.

    Good evidence

    Every machine running a key caching application applies a maximum lifetime of four hours or less, and none runs an agent without one.

  2. Check 2 of 3What an auditor asks for

    Ask for

    A demonstration on a sampled workstation of a key loaded through the normal start-up, with the agent's key list checked just after four hours.

    Look at

    Whether the key is still cached.

    Good evidence

    The key is listed when loaded and gone within four hours of loading, without anyone removing it.

  3. Check 3 of 3What an auditor asks for

    Ask for

    Screen lock settings on sampled workstations and servers where agents run, including any the organisation treats as not applicable.

    Look at

    Whether each locks as ISM-2012 requires, and why each exception was judged not applicable.

    Good evidence

    Each machine where an agent runs in a desktop, local console or remote desktop session locks as ISM-2012 requires, and every machine treated as not applicable has no such session.

Mappings

Closest match in ISO/IEC 27001: A.5.15, Access control, which this control partially meets.

ISO 27001

ISO/IEC 27001: 3 mappings

  • A.5.15Access controlPartially meets
  • A.8.1User end point devicesPartially meets
  • A.8.24Use of cryptographyPartially meets

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