A linux systems administrator is setting up ssh access with - CompTIA Linux + XK0-005

Question

A Linux systems administrator is setting up SSH access with PKI for several users using their newly created RSA keys. Which of the following MOST securely achieves this task?

Answers
  1. correct
Explanation

The Correct Answer is: C. Use ssh-copy-id to copy each user’s public key file to the respective system
The ssh-copy-id command is specifically designed to securely copy a user’s public SSH key to a remote system’s ~/.ssh/authorized_keys file. This allows the user to authenticate via their private key without needing to manually edit files or worry about permissions and formatting. It automates the process, ensuring the key is appended correctly and that the remote SSH directory and file permissions are set securely, which is essential for maintaining SSH security.

Why the other options are incorrect:

  • A. Use curl to copy each user’s public key file to the respective system
    Using curl is not a secure or standard method to transfer SSH keys. It doesn’t handle permissions or the proper placement of keys and can expose keys to interception if not used over secure channels.

  • B. Use cp to copy each user’s public key file to the respective system
    The cp command is local only; it cannot copy files to a remote system by itself. Even if combined with tools like scp, it doesn’t handle permissions or key integration automatically.

  • D. Use ssh-copy-id to copy each user’s private key file to the respective system
    This is a critical security mistake. Private keys should never be copied or shared between systems. They must remain secret and only stored securely on the client machine.

Related Courses

Discover a range of courses designed to provide you with the knowledge and skills needed to excel in your chosen field.

a prepsaret exam featured image
CompTIA Prep

220-1201 - CompTIA A+ Exam Core 1

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

220-1202 - CompTIA A+ Exam Core 2

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA SecurityX CAS-005

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Cloud Essentials+ CLO-002

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Network+ N10-009

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Security+ SY0-701

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Data + DA0-001

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Pentest+

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA CySA+ CSO-003

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA DataSys+ DS0-001

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Tech+ FC0-U71

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Cloud+ CV0-004

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Server+ SK0-005

Start Course Prep

Easy way to pass your test within a week with prepsaret

You don’t need one month to study and pass your test.
With Prepsaret, it takes you a few days to grasp all the concepts needed to pass your exams

View Courses Offered