nerdexam
CompTIA

LX0-104 · Question #397

A user is attempting to connect to a remote host via SSH and following message is displayed: Host key verification failed. Which of the following options could resolve the problem? (Select TWO correct

The correct answer is A. Add the o StrictHostKeyChecking=no option to the command. E. Update the remote host's SSH host key in the list of know hosts.. The 'Host key verification failed' error occurs when the client cannot verify the remote host's identity against its list of known hosts, indicating a mismatch or missing key.

Security

Question

A user is attempting to connect to a remote host via SSH and following message is displayed: Host key verification failed. Which of the following options could resolve the problem? (Select TWO correct answers)

Options

  • AAdd the o StrictHostKeyChecking=no option to the command.
  • BEnable the PasswordAuthentication parameter on the remote host.
  • CGenerate new SSH host keys on the remote host.
  • DGenerate a new private key which is compatible with the server's host key.
  • EUpdate the remote host's SSH host key in the list of know hosts.

How the community answered

(54 responses)
  • A
    80% (43)
  • B
    6% (3)
  • C
    11% (6)
  • D
    4% (2)

Why each option

The 'Host key verification failed' error occurs when the client cannot verify the remote host's identity against its list of known hosts, indicating a mismatch or missing key.

AAdd the o StrictHostKeyChecking=no option to the command.Correct

Adding -o StrictHostKeyChecking=no to the SSH command bypasses the host key verification step for that session, allowing connection without confirming the host's identity, though this reduces security.

BEnable the PasswordAuthentication parameter on the remote host.

Enabling PasswordAuthentication allows password-based login but does not address the host key verification failure, which is about authenticating the server's identity to the client.

CGenerate new SSH host keys on the remote host.

Generating new SSH host keys on the remote host would change the server's public key, which would likely necessitate updating the client's known_hosts file anyway, not directly resolving the existing client-side verification error.

DGenerate a new private key which is compatible with the server's host key.

Generating a new private key on the client is for client authentication to the server, not for verifying the server's host key, and thus will not resolve the host key verification error.

EUpdate the remote host's SSH host key in the list of know hosts.Correct

Updating the remote host's SSH host key in the client's ~/.ssh/known_hosts file resolves the error by ensuring the client has the correct and trusted public key for the server, thereby validating its identity.

Concept tested: SSH host key verification and resolution

Source: https://man7.org/linux/man-pages/man5/ssh_config.5.html

Topics

#SSH troubleshooting#host key verification#StrictHostKeyChecking#known_hosts

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice