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.
Question
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)- A82% (28)
- B9% (3)
- C3% (1)
- D6% (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.
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`.
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.
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.
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.
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
Community Discussion
No community discussion yet for this question.