Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (12.9k points)

I've just setup my very first EC2 server.

It asks for the root password to my EC2 server when I try connect to it.

Any suggestions?

1 Answer

0 votes
by (18.2k points)

To connect to your instance you will need to provide your keypair file(pem file). After that, it won't ask for the password. Here's how you do it:

ssh -i /path/keypair.pem username@public_dns_name

In the above command, for path, use the path of your pem file and replace keypair.pem with your key pair pem file.

The username for Ubuntu will be ubuntu and for other instances including Amazon Linux, use ec2-user as the username.

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer

Browse Categories

...