SSH error while OpenSCAP scanning

Problem:
Getting SSH error while OpenSCAP scanning through ansible role
Expected outcome:
Scanning should work
Other relevant data:

I am getting an ssh error while I try to run an openscap ansible role from the foreman.

I tried to run a test ansible script from my foreman machine to the target machine, and that worked. But when I try to run an openscap ansible role, it gives me an ssh error. Any help would be appreciated

From your foreman machine or from Foreman itself?

from foreman machine to the target machine

Well, that’s not enough really. Try it from Foreman, which most likely will fail. Try looking at the key management section in the docs Managing Hosts

Managed to resolve it. Added foreman-proxy ssh key to the target machine and it worked

1 Like