Problem Logging into EC2 Machine!

0 votes

I was provided with some login information for the EC2 machine, basically an ec2-X-X-X.compute-X.amazonaws.com plus a username and password.

How do I access this machine? I tried to use SSH as below:

ssh username@ec2-X-X-X.compute-X.amazonaws.com

but it's giving a Permission denied: Please try again, whenever I am entering the password. Am I using the SSH in a right way to access the EC2 machine or the problem is that I was provided with invalid login credentials?

May 9, 2018 in AWS by Cloud gunner
• 4,240 points
14 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Things to check when trying to connect to an Amazon EC2 instance:

  • Security Group: Make sure the security group allows inbound access on the desired ports (eg 80, 22) for the appropriate IP address range (eg 0.0.0.0/0). This solves the majority of problems.
  • Public IP Address: Check that you're using the correct Public IP address for the instance. If the instance is stopped and started, it might receive a new Public IP address (depending on how it has been configured).
  • VPC Configuration: Accessing an EC2 instance that is launched inside a Virtual Private Cloud (VPC) requires:
    • An Internet Gateway
    • routing table connecting the subnet to the Internet Gateway
    • NACLs (Network ACLS) that permit through-traffic

If you are able to launch and connect to another instance in the same subnet, then the VPC configuration would appear to be correct.

The other thing to check would be the actual configuration of the operating system on the instance itself. Some software may be affecting the configuration so that the web server / ssh daemon is not working correctly. Of course, that is hard to determine without connecting to the instance.

If you are launching from a standard Amazon Linux AMI, ssh would work correctly anytime. The web server (port 80) would require installation and configuration of software on the instance, which is your responsibility to maintain.

answered Aug 13, 2018 by bug_seeker
• 14,960 points

Related Questions In AWS

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,100 points
56 views
+13 votes
2 answers
0 votes
1 answer

EC2 API throttling limits

Amazon EC2 has meanwhile documented their general Query API ...READ MORE

answered Aug 13, 2018 in AWS by bug_seeker
• 14,960 points
62 views
+5 votes
4 answers

Facing rendering issue in AWS EC2 instance

Hey @Vanshika there could be many factors ...READ MORE

answered Aug 20, 2018 in AWS by Priyaj
• 56,100 points
76 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.