From e4df8c3d36f363b7e5b3b80c0cfd7aa2a99e5d92 Mon Sep 17 00:00:00 2001 From: Patrick Michaud Date: Wed, 11 Jun 2014 11:43:24 -0700 Subject: [PATCH] Have paramiko use /etc/ssh_known_hosts Fixes an issue with a confusing error: "paramiko: The authenticity of host '[host]' can't be established" when ssh on the command line doesn't complain Closes PR #7730 --- lib/ansible/plugins/connections/paramiko_ssh.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/plugins/connections/paramiko_ssh.py b/lib/ansible/plugins/connections/paramiko_ssh.py index 5fae3626ab4..cd38f389571 100644 --- a/lib/ansible/plugins/connections/paramiko_ssh.py +++ b/lib/ansible/plugins/connections/paramiko_ssh.py @@ -152,6 +152,7 @@ class Connection(ConnectionBase): self.keyfile = os.path.expanduser("~/.ssh/known_hosts") if C.HOST_KEY_CHECKING: + ssh.load_system_host_keys("/etc/ssh/ssh_known_hosts") ssh.load_system_host_keys() ssh.set_missing_host_key_policy(MyAddPolicy(self._new_stdin))