{"description": "When creating SSH key pairs, always use a passcode.\n<br />\nYou can create such keys with the following command:\n<pre>$ sudo ssh-keygen -n [passphrase]</pre>\nUbuntu 22.04, for certificate-based authentication, must enforce authorized access to the corresponding private key.", "rationale": "If an unauthorized user obtains access to a private key without a passcode,\nthat user would have unauthorized access to any system where the associated\npublic key has been installed.", "severity": "medium", "references": {"srg": ["SRG-OS-000067-GPOS-00035"]}, "control_references": {}, "components": [], "identifiers": {}, "ocil_clause": "no ssh private key is accessible without a passcode", "ocil": "For each private key stored on the system, use the following command:\n<pre>$ sudo ssh-keygen -y -f /path/to/file</pre>\nIf the contents of the key are displayed, this is a finding.", "oval_external_content": null, "fixtext": "", "checktext": "", "vuldiscussion": "", "srg_requirement": "", "warnings": [], "conflicts": [], "requires": [], "policy_specific_content": {"stig": {"checktext": "Verify the SSH private key files have a passcode.\n\nFor each private key stored on the system, use the following command:\n\n$ sudo ssh-keygen -y -f /path/to/file\n\nIf the contents of the key are displayed, this is a finding.", "fixtext": "Create a new private and public key pair that utilizes a passcode with the following command:\n\n$ sudo ssh-keygen -n [passphrase]", "vuldiscussion": "If the private key is discovered, an attacker can use the key to authenticate as an authorized user and gain access to the network infrastructure.\n\nThe cornerstone of the PKI is the private key used to encrypt or digitally sign information.\n\nIf the private key is stolen, this will lead to the compromise of the authentication and nonrepudiation gained through PKI because the attacker can use the private key to digitally sign documents and pretend to be the authorized user.\n\nBoth the holders of a digital certificate and the issuing authority must protect the computers, storage devices, or whatever they use to keep the private keys.", "srg_requirement": "Ubuntu 22.04, for PKI-based authentication, must enforce authorized access to the corresponding private key."}}, "platform": null, "platforms": [], "sce_metadata": {"platform": ["multi_platform_all"], "environment": "any", "filename": "ssh_keys_passphrase_protected.sh", "relative_path": "ubuntu2204/checks/sce/ssh_keys_passphrase_protected.sh"}, "inherited_platforms": [], "cpe_platform_names": [], "inherited_cpe_platform_names": [], "bash_conditional": null, "fixes": {}, "title": "Verify the SSH Private Key Files Have a Passcode", "definition_location": "/aptdata/openscap/scap-security-guide/linux_os/guide/services/ssh/ssh_client/ssh_keys_passphrase_protected/rule.yml", "template": null}