nerdexam
Cisco

300-910 · Question #46

Which action resolves the error?

The correct answer is C. Export the ANSIBLE_HOST_KEY_CHECKING=False variable. The error, likely related to SSH host key verification, can be resolved by temporarily disabling Ansible's strict host key checking mechanism.

Infrastructure Automation

Question

Which action resolves the error?

Options

  • APush the Paramiko library on the host that runs Ansible
  • BGenerate a new SSH key pair and add the public key to the target machine
  • CExport the ANSIBLE_HOST_KEY_CHECKING=False variable
  • DComment out the StrictHostKeyChecking=yes line from ansible.cfg

How the community answered

(27 responses)
  • A
    4% (1)
  • C
    89% (24)
  • D
    7% (2)

Why each option

The error, likely related to SSH host key verification, can be resolved by temporarily disabling Ansible's strict host key checking mechanism.

APush the Paramiko library on the host that runs Ansible

Paramiko is an SSH library used by Ansible; it is a prerequisite usually installed with Ansible, and 'pushing' it is not a standard or relevant action to resolve an SSH host key verification error.

BGenerate a new SSH key pair and add the public key to the target machine

Generating and adding a new SSH key pair resolves client authentication issues, not issues related to the server's identity verification (host key checking).

CExport the ANSIBLE_HOST_KEY_CHECKING=False variableCorrect

When Ansible encounters an unknown host key or a changed host key, it will typically fail with an error like 'Host key verification failed'. Exporting the `ANSIBLE_HOST_KEY_CHECKING=False` environment variable instructs Ansible to bypass this strict host key verification for the current execution, allowing the connection to proceed without manual confirmation of the host key.

DComment out the StrictHostKeyChecking=yes line from ansible.cfg

Commenting out `StrictHostKeyChecking=yes` in `ansible.cfg` might disable host key checking if the default behavior is `ask` or `yes`, but setting `ANSIBLE_HOST_KEY_CHECKING=False` is a more direct and often temporary override for Ansible specifically.

Concept tested: Ansible SSH host key checking configuration

Source: https://docs.ansible.com/ansible/latest/reference_appendices/config.html#ansible-host-key-checking

Topics

#Ansible#SSH#Host Key Checking#Configuration

Community Discussion

No community discussion yet for this question.

Full 300-910 Practice