0

I am trying to learn Chef and started installing its components. I have three micro EC2 RHEL7.X instances running on AWS. In those, one EC2 configured as chef-server, second Ec2 as workstation perfectly. But, when i try to bootstrap third EC2 from work station, i always get the following ERROR.

I used the bellow commands to install the client from workstation.

 knife bootstrap -.-.-.- -x root -P password --node-name client ==> i do not have any password set for the client EC2 instance

Also tried

 knife bootstrap -.-.-.- --ssh-user ec2-user --sudo -i ./some.pem --run-list webserver
  knife bootstrap -.-.-.- --ssh-user ec2-user --sudo --identity-file ./some.pem --run-list webserver

Got Error

ERROR: Net::SSH::AuthenticationFailed: Authentication failed for user ec2-user@-.-.-.-@-.-.-.-

But never get this working. I know there are some AWS existing utilities around Chef but i want to use only with normal EC2 instances.

Any help on how can i do this in this scenario.

rakeeee
  • 973
  • 4
  • 19
  • 44

1 Answers1

0

I created the SSL key for workstation and then added that key in client's “/home/ec2-user/.ssh/authorized_keys" and then ran the below command from workstation which got worked

knife bootstrap -.-.-.- --ssh-user ec2-user --sudo --identity-file /home/ec2-user/keyworkstation --node-name client
rakeeee
  • 973
  • 4
  • 19
  • 44