ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 82 - XK0-005 discussion

Report
Export

A user generated a pair of private-public keys on a workstation. Which of the following commands will allow the user to upload the public key to a remote server and enable passwordless login?

A.
scp ~/.ssh/id_rsa user@server:~/
Answers
A.
scp ~/.ssh/id_rsa user@server:~/
B.
rsync ~ /.ssh/ user@server:~/
Answers
B.
rsync ~ /.ssh/ user@server:~/
C.
ssh-add user server
Answers
C.
ssh-add user server
D.
ssh-copy-id user@server
Answers
D.
ssh-copy-id user@server
Suggested answer: D

Explanation:

The command ssh-copy-id user@server will allow the user to upload the public key to a remote server and enable passwordless login. The ssh-copy-id command is a tool for copying the public key to a remote server and appending it to the authorized_keys file, which is used for public key authentication. The command will also set the appropriate permissions on the remote server to ensure the security of the key. The command ssh-copy-id user@server will copy the public key of the user to the server and allow the user to log in without a password. This is the correct command to use for this task. The other options are incorrect because they either do not copy the public key (scp, rsync, or ssh-add) or do not use the correct syntax (scp ~/.ssh/id_rsa user@server:~/ instead of scp ~/.ssh/id_rsa.pub user@server:~/ or rsync ~ /.ssh/ user@server:~/ instead of rsync ~/.ssh/id_rsa.pub user@server:~/). Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 13: Managing Network Services, page 410.

asked 02/10/2024
Massimiliano Parisi
39 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first