EC2 instance & private key

hi,

why we need private key file for amazon EC2 instances

Hello @Kalpana,
A key pair, consisting of a public key and a private key, is a set of security credentials that you use to prove your identity when connecting to an Amazon EC2 instance. Amazon EC2 stores the public key on your instance, and you store the private key. For Linux instances, the private key allows you to securely SSH into your instance.

1 Like

hi @Ayman can i connect the ec2 instance with the public ip address on ec2 instance (without private key file)?

Hello @Kalpana,
Yes, you can from the AWS console itself.
1- Open your favorite web browser and connect to AWS console.
2-Navigate to AWS EC2 and select the instance you want to connect and click ‘Connect’.
3- Select ‘Session Manager’ and click ‘Connect’.

1 Like

actually @Ayman, I mean without that method, can I connect to an instance using putty and public IP of the ec2 instance

Hello @Kalpana,
First, you need the private key file to log in. After you logged in, you are able to create users, and allow password-based login to SSH and then you can log in without a key from those users.

1 Like

Thank you so much @Ayman , I got clear now… Thanks !