rjurney / Agile_Data_Code_2

Code for Agile Data Science 2.0, O'Reilly 2017, Second Edition
http://bit.ly/agile_data_science
MIT License
456 stars 307 forks source link

password required for sshing into ec2 instance #33

Closed 80kr closed 6 years ago

80kr commented 7 years ago

password is required for agile_data_science_pem file, is this expected?

rjurney commented 7 years ago

Can you try removing the security group and key from AWS and trying again? I'm wondering if you're seeing this on the first run or the second plus?

josecyc commented 7 years ago

@AlexDKR were you able to solve it? having the same problem

josecyc commented 7 years ago

I try deleting the security group and key from AWS but was unable to update correctly the keys in the aws cli.

How can I update my access keys from the configure command in the aws cli?

Every time I try to change them or delete them it seems that it just adds text to the one I already wrote before.

Example: 1st key: XXXXXXXXXXXXX 2nd key:YYYYYYYYYYYYY Update: XXXXXXXXXXXXXYYYYYYYYYYYYYY

I would like to see how can I erase that first key but nothing really seems to work. If I write None it is just added at the end.

To change the region I have no problem but the keys are proving a PITA

I keep getting this error

An error occurred (AuthFailure) when calling the AuthorizeSecurityGroupIngress operation: AWS was not able to validate the provided access credentials

In the other forums it says this error is mainly because of a lack of synchronization of the local time, but I already fixed that with

sudo ntpdate pool.ntp.org

josecyc commented 7 years ago

I solved it. It is either you have put the keys incorrectly or the time is off.

Its possible to update the keys in an incorrect manner if you just copy paste them given that amazon provides them without spaces, the way I was entering them was including "secretkey=" so just maybe check.

rjurney commented 7 years ago

I have made it so that the ec2.sh script now checks for existing security groups and key pairs named agile_data_science before recreating them. This should address this problem.

If you have trouble, use the AWS console to delete the key pair and security group called agile_data_science and re-run ec2.s and that should resolve them.

rjurney commented 7 years ago

Oh, I'm going to leave this open in case anyone out there has the old code and will need to see this ticket.

rjurney commented 7 years ago

The commits were https://github.com/rjurney/Agile_Data_Code_2/commit/b4937e05c6615395c9d0e4abeca8ede4af483adb and https://github.com/rjurney/Agile_Data_Code_2/commit/35c7fb3e4d8a527a1189e979a92e0addd112c1a8

rjurney commented 7 years ago

@AlexDKR @josecyc Can you please try removing the security group and key pair named agile_data_science and re-running ec2.sh

It should work now.

80kr commented 7 years ago

@rjurney cloned the freshest copy of agile 2.0 and deleted security group and key pair on aws.

after doing so, good stuff and works like a charm.

rjurney commented 6 years ago

@AlexDKR thanks!