I'm using AWS with EC2 instances in a private subnet meaning they have no public facing IP/hostname. When I install and run chef-client
on the node, it's registered on the Chef Server using it's private hostname and ip, e.g.
ip-10-0-5-56.ec2.internal
10.0.5.56
When I try to run knife ssh "role:web" "sudo chef-client" -x ubuntu -i key.pem
from my local machine, it tries to connect to the nodes using the private hostname. This hostname doesn't actually exist and it doesn't connect. I would like knife
to connect using the private ip instead. Is this possible?