amazon-archives / aws-serverless-auth-reference-app

Serverless reference app and backend API, showcasing authentication and authorization patterns using Amazon Cognito, Amazon API Gateway, AWS Lambda, and AWS IAM.
Other
754 stars 193 forks source link

Can not connect using putty and ec2-user #44

Closed anothercoder2 closed 6 years ago

anothercoder2 commented 6 years ago

hello, I have converted my .pem key to .ppk. When trying to connect as ec2-user I get the error "Server refused our key" Also tried root Thanks

justonian commented 6 years ago

Did you update the username that you're trying to connect with? Be sure to use "ec2-user" for any Amazon Linux-based AMI.

anothercoder2 commented 6 years ago

I am using this guide. https://github.com/awslabs/aws-serverless-auth-reference-app/blob/master/Quickstart.md I am using ec2-user and have been able to use it the past with other Amazon Linux APIs. Thanks

justonian commented 6 years ago

Are you following the instructions at http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html? This project has been around for almost one year and I've never had anyone have issues with this.

Also, when you created an instance from the public AMI we published in us-east-1, did you assign it the keypair that you're trying to connect with?

justonian commented 6 years ago

Alternatively, you can also pull the Docker image on the EC2 AMI locally if you're running the Docker engine on your computer from https://hub.docker.com/r/awsdevops/aws-serverless-auth-reference-app/. The only reason we had it on the EC2 instance is to not require all users of a previous workshop to download the Docker image locally, but it should be very quick assuming you have a reasonably fast internet connection.

anothercoder2 commented 6 years ago

Yes the keypair is assigned .Launched with another account/keypair and it worked. Not sure what the issue is with this account. Thanks for such prompt response. Best

justonian commented 6 years ago

Good to hear. Closing this issue for now. Hope you find value in the app!