XK0-005 · Question #487
A systems administrator is tasked with setting up key-based SSH authentication. In which of the following locations should the administrator place the public keys for the server?
The correct answer is C. ~/.ssh/authorized_keys. For key-based SSH authentication, a user's public key must be placed in a specific file within their home directory on the server to allow access.
Question
A systems administrator is tasked with setting up key-based SSH authentication. In which of the following locations should the administrator place the public keys for the server?
Options
- A~/.sshd/authkeys
- B~/.ssh/keys
- C~/.ssh/authorized_keys
- D~/.ssh/keyauth
How the community answered
(51 responses)- A4% (2)
- C94% (48)
- D2% (1)
Why each option
For key-based SSH authentication, a user's public key must be placed in a specific file within their home directory on the server to allow access.
~/.sshd/authkeys is not a standard or recognized location for SSH public keys.
~/.ssh/keys is not the standard filename for SSH public keys; the correct filename is `authorized_keys`.
The standard location for a user's public SSH keys that authorize access to their account on a server is the `authorized_keys` file, located within the `~/.ssh/` directory in the user's home directory. Each line in this file typically contains one public key.
~/.ssh/keyauth is not a standard or recognized location or filename for SSH public keys.
Concept tested: SSH key-based authentication file location
Source: https://www.ssh.com/academy/ssh/authorized_keys
Topics
Community Discussion
No community discussion yet for this question.