diff --git a/docker/transport/sshconn.py b/docker/transport/sshconn.py index ba8c11d1f..4f748f75a 100644 --- a/docker/transport/sshconn.py +++ b/docker/transport/sshconn.py @@ -215,7 +215,7 @@ def _create_paramiko_client(self, base_url): self.ssh_params['key_filename'] = host_config['identityfile'] self.ssh_client.load_system_host_keys() - self.ssh_client.set_missing_host_key_policy(paramiko.WarningPolicy()) + self.ssh_client.set_missing_host_key_policy(paramiko.RejectPolicy()) def _connect(self): if self.ssh_client: