nerdexam
CompTIA

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.

Security

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)
  • A
    4% (2)
  • C
    94% (48)
  • D
    2% (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.

A~/.sshd/authkeys

~/.sshd/authkeys is not a standard or recognized location for SSH public keys.

B~/.ssh/keys

~/.ssh/keys is not the standard filename for SSH public keys; the correct filename is `authorized_keys`.

C~/.ssh/authorized_keysCorrect

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.

D~/.ssh/keyauth

~/.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

#SSH#Key-based Authentication#Public Keys#File Paths

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice