0 votes
1 view
in AWS by (9.2k 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.5k 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 [email protected]_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.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...