nerdexam
Linux_Foundation

LFCS · 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…

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. When SSH host key verification fails, the issue can be resolved by either temporarily disabling strict host key checking or by updating the server's host key in the client's known_hosts file.

Submitted by andres_qro· Apr 18, 2026Service Configuration

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

(34 responses)
  • A
    82% (28)
  • B
    9% (3)
  • C
    3% (1)
  • D
    6% (2)

Why each option

When SSH host key verification fails, the issue can be resolved by either temporarily disabling strict host key checking or by updating the server's host key in the client's `known_hosts` file.

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

Adding `StrictHostKeyChecking=no` to the SSH command or configuration temporarily disables the host key verification, allowing the connection to proceed without confirming the key and adding it to `known_hosts`.

BEnable the PasswordAuthentication parameter on the remote host.

Enabling `PasswordAuthentication` on the remote host is unrelated to host key verification issues; it only changes how user authentication occurs after the host is verified.

CGenerate new SSH host keys on the remote host.

Generating new SSH host keys on the remote host would only further invalidate existing entries in clients' `known_hosts` files, exacerbating the problem rather than resolving it for existing connections.

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

Generating a new private key is for user authentication (e.g., `ssh-keygen` for `id_rsa`), not for resolving host key verification failures which pertain to the server's identity.

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 `known_hosts` file (e.g., by manually editing it or using `ssh-keygen -R`) resolves the verification failure if the server's key has genuinely changed or was incorrect.

Concept tested: SSH host key verification resolution

Source: https://man7.org/linux/man-pages/man1/ssh.1.html

Topics

#SSH#Host Key Verification#known_hosts#Troubleshooting

Community Discussion

No community discussion yet for this question.

Full LFCS Practice