XK0-005 · Question #1229
XK0-005 Question #1229: Real Exam Question with Answer & Explanation
The correct answer is D: Stop using that key and run ssh-keygen to generate a new key pair.. E-mailing an SSH private key (id_rsa) compromises its confidentiality, making the key pair insecure. The compromised key must be abandoned and a new, secure key pair generated.
Question
When requesting SSH access to a remote system, a user accidentally emailed the id_rsa key to the administrator. Which of the following should the user do NEXT?
Options
- ARun the ssh-add command to add the remote system to known_hosts.
- BAsk the administrator to run chmod 600 id_rsa on the remote system.
- CDelete id_rsa key file and send the id_rsa.pub key file instead.
- DStop using that key and run ssh-keygen to generate a new key pair.
Explanation
E-mailing an SSH private key (id_rsa) compromises its confidentiality, making the key pair insecure. The compromised key must be abandoned and a new, secure key pair generated.
Common mistakes.
- A. Running
ssh-addadds a private key to the SSH agent for convenience, andknown_hostsmanages server identities; neither action addresses the fundamental compromise of the private key. - B. While
chmod 600 id_rsasets appropriate permissions for a private key, this action does not undo the security breach that occurred by emailing the key, which has already been exposed. - C. Simply deleting the
id_rsafile and sending theid_rsa.pubfrom the same key pair is insufficient, as the private key has already been compromised. A new, uncompromised key pair is required.
Concept tested. SSH key security compromise
Reference. https://man7.org/linux/man-pages/man1/ssh-keygen.1.html
Topics
Community Discussion
No community discussion yet for this question.