exam questions

Exam XK0-004 All Questions

View all questions & answers for the XK0-004 exam

Exam XK0-004 topic 1 question 107 discussion

Actual exam question from CompTIA's XK0-004
Question #: 107
Topic #: 1
[All XK0-004 Questions]

A junior Linux administrator needs to access production servers using a secure SSH protocol. Which of the following files should contain the public key to gain remote access to the server?

  • A. ~/ssh/authorized-keys
  • B. /etc/authorized_keys
  • C. /etc/sshd/ssh.conf
  • D. ~/.ssh/authorized_keys
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️
Reference:
https://www.linode.com/docs/security/securing-your-server/

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
DiaaEmara
2 years, 5 months ago
To authenticate using SSH keys, a user must have an SSH key pair on their local computer. On the remote server, the public key must be copied to a file within the user’s home directory at ~/.ssh/authorized_keys. This file contains a list of public keys, one-per-line, that are authorized to log into this account When a client connects to the host, wishing to use SSH key authentication, it will inform the server of this intent and will tell the server which public key to use. The server then checks its authorized_keys file for the public key, generates a random string, and encrypts it using the public key. This encrypted message can only be decrypted with the associated private key. The server will send this encrypted message to the client to test whether they actually have the associated private key.
upvoted 1 times
...
braveheart22
2 years, 6 months ago
D is the right answer ~/.ssh/authorized_keys On the remote server, the public key must be copied to a file within the user's home directory at ~/. ssh/authorized_keys . This file contains a list of public keys, one per line, that are authorized to log into this account. https://www.digitalocean.com/community/tutorials/ssh-essentials-working-with-ssh-servers-clients-and-keys
upvoted 1 times
...
examtopics_htc
2 years, 6 months ago
Selected Answer: D
~/.ssh/authorized_keys
upvoted 1 times
...
braveheart22
2 years, 7 months ago
Yes option D is the right option https://www.digitalocean.com/community/tutorials/ssh-essentials-working-with-ssh-servers-clients-and-keys
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago