ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 72 - XK0-005 discussion

Report
Export

A junior administrator is trying to set up a passwordless SSH connection to one of the servers. The administrator follows the instructions and puts the key in the authorized_key file at the server, but the administrator is still asked to provide a password during the connection.

Given the following output:

Which of the following commands would resolve the issue and allow an SSH connection to be established without a password?

A.
restorecon -rv .ssh/authorized_key
Answers
A.
restorecon -rv .ssh/authorized_key
B.
mv .ssh/authorized_key .ssh/authorized_keys
Answers
B.
mv .ssh/authorized_key .ssh/authorized_keys
C.
systemctl restart sshd.service
Answers
C.
systemctl restart sshd.service
D.
chmod 600 mv .ssh/authorized_key
Answers
D.
chmod 600 mv .ssh/authorized_key
Suggested answer: B

Explanation:

The command mv .ssh/authorized_key .ssh/authorized_keys will resolve the issue and allow an SSH connection to be established without a password. The issue is caused by the incorrect file name of the authorized key file on the server. The file should be named authorized_keys, not authorized_key.

The mv command will rename the file and fix the issue. The other options are incorrect because they either do not affect the file name (restorecon or chmod) or do not restart the SSH service (systemctl). Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 13: Managing Network Services, page 410.

asked 02/10/2024
Thijs van Ham
36 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first