Facts:
- I have a Chef server installed.
- I have registered a node to this server, and I can see the node in the webUI (This is an existing node, NOT bootstrapped using knife bootstrap
-
When I execute the command
$ knife ssh "role:test" "sudo chef-client" WARNING: Failed to connect to node[ip-X-X-X-X.ec2.internal] -- Net::SSH::AuthenticationFailed: ubuntu@ip-X-X-X-X.ec2.internal
Is there something I have missed? e.g. copy the SSH keys?
Best Answer
This problem is usually caused by not having the right private key PEM file added to your local ssh agent. Doing something like:
Where the argument is the private part of the key pair used to create the EC2 instance.