CompTIACompTIA
XK0-005 · Question #364
XK0-005 Question #364: Real Exam Question with Answer & Explanation
The correct answer is A: -/, ssh/authorized_keys. To enable SSH key-based authentication, the public key generated on the client machine must be placed in the ~/.ssh/authorized_keys file on the remote server.
Security
Question
An administrator wants to be able to access a remote server. After creating an SSH key pair, which of the following describes where the public key should be placed to allow for key-based authentication?
Options
- A-/, ssh/authorized_keys
- B-/ssh/id_ras.pub
- C-/.ssh/known_hosts
- D-/.ssh/config
Explanation
To enable SSH key-based authentication, the public key generated on the client machine must be placed in the ~/.ssh/authorized_keys file on the remote server.
Common mistakes.
- B.
~/.ssh/id_rsa.pubis the default location for the client's own public key on the client machine, not where public keys are placed on the remote server for authentication. - C.
~/.ssh/known_hostsstores the public keys of remote servers the client has connected to, which is used to verify the server's identity, not for client authentication to the server. - D.
~/.ssh/configis a client-side configuration file used to define custom SSH connection settings for different hosts, not for storing public keys on the remote server for authentication.
Concept tested. SSH key-based authentication; authorized_keys file
Topics
#SSH#Key-based authentication#Remote access#File paths
Community Discussion
No community discussion yet for this question.