I have a remote machine to which I want the connection to be set.
This is my hosts file:
[remote]
192.168.51.2
where 192.168.51.2 is the private ip of the remote machine.
When I try pinging it using ansible remote -m ping
, I get the following error:
192.168.51.2 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh.",
"unreachable": true
}
I did not mention the credentials of that remote machine anywhere, but I don't think that's the problem here. It is failing to connect via SSH.
What do I do?