Open Fabl0s opened 5 months ago
Hi @Fabl0s
Did you try to add environment variable ANSIBLE_HOST_KEY_CHECKING=True
?
Hi @Fabl0s Did you try to add environment variable
ANSIBLE_HOST_KEY_CHECKING=True
?
Not via Variable, I added it to my ansible.cfg as a workarround for now and it does work that way. I can also check via EnvVar but I'd expect the same result. But I would much preferr to auto-accept new keys and deny changed keys as a default over no checking at all. At least as an opt-in if you absolutely want to keep it off by default.
My point about this beeing not Ideal still stands regarding Security:
Ansible enables host key checking by default. Checking host keys guards against server spoofing and man-in-the-middle attacks, but it does require some maintenance.
A more secure default should be kept if its already there in ansible imo. It also can cause issues with enterprises security compliance aswell.
Hi @Fabl0s
If a new host is not in ‘known_hosts’ your control node may prompt for confirmation of the key, which results in an interactive experience if using Ansible, from say, cron.
It is why this scenario doesn't work. I tried disable interactive but it breaks authentication by login/password.
"Why Semaphore hangs" - most frequently asked question.
Hi @Fabl0s
If a new host is not in ‘known_hosts’ your control node may prompt for confirmation of the key, which results in an interactive experience if using Ansible, from say, cron.
It is why this scenario doesn't work. I tried disable interactive but it breaks authentication by login/password.
"Why Semaphore hangs" - most frequently asked question.
I think I never had any interactive parts when using ssh flag "accept-new" - Ansible would just fail that single node in a run when we replaced a node. Maybe that can be an option?
However, could Key-Checking still be some sort of opt-in for those who want it and dont use Password Logins anyway?
Issue
Hello,
the current Develop Image seems to break SSH Connections when we keep Hostkey-Checking enabled.
In the ansible.cfg:
and in the ssh.d/config:
This is working fine with the :latest Docker Image. Entirely disabling Hostkey Checks could be argued to lessen the Security. No Error occurs when leaving the default ansible.cfg alone in /tmp/semaphore/ansible.cfg.
This Error occurs on all Hosts when sticking to above Config: Maybe I just miss some change lately? Please let me know if you need anything else to know.
Impact
Ansible (task execution)
Installation method
Docker
Database
Postgres
Browser
Microsoft Edge
Semaphore Version
develop-f144075-1717871677
Ansible Version
Logs & errors
No response
Manual installation - system information
No response
Configuration
No response
Additional information
No response