[P1] host_key_checking = False in ansible.cfg — MITM risk #1

Closed
opened 2026-03-22 18:04:09 +00:00 by jeet · 0 comments
Owner

Problem

ansible.cfg has host_key_checking = False. Any man-in-the-middle between your Ansible machine and OCI instances would be silently accepted — especially dangerous since vault secrets are deployed over these connections.

Fix

Flip the setting:

host_key_checking = True

Then populate ~/.ssh/known_hosts once per host:

ssh-keyscan -H <host-ip> >> ~/.ssh/known_hosts

File: ansible.cfg

## Problem `ansible.cfg` has `host_key_checking = False`. Any man-in-the-middle between your Ansible machine and OCI instances would be silently accepted — especially dangerous since vault secrets are deployed over these connections. ## Fix Flip the setting: ```ini host_key_checking = True ``` Then populate `~/.ssh/known_hosts` once per host: ```bash ssh-keyscan -H <host-ip> >> ~/.ssh/known_hosts ``` **File:** `ansible.cfg`
jeet closed this issue 2026-03-22 18:14:21 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jeet/OCI_Build#1