I want to login to the instance i created on Amazon Web Services. I get the following error.
login as: root
Server refused our key
Using keyboard-interactive authentication.
Password:
I dont know what to enter as Password. I have given the privatekey created from PuttyGen.
In PuTTYgen, load your private key file and select Save Private Key rather than Generate. Verify that you are connecting with the appropriate user name for your AMI. Enter the user name in the Host name box in the PuTTY Configuration window. For Amazon Linux 2 or the Amazon Linux AMI, the user name is ec2-user .
This error occurs if you created a password for your key file, but haven't manually entered the password. To resolve this error, enter the password or use ssh-agent to load the key automatically. There are a number of reasons why you might get an SSH error, like Resource temporarily unavailable.
The username of Amazon AMI is difference depend on the AMI creator,
for Amazon AMI , user ec2-user for Ubuntu AMI , user ubuntu
You may search from the ami-id to see what is the default username of that AMI. Please ensure that this key you use is the private key for the public key which you put to key-binding when you created the instance.
Try logging in as ec2-user. On the instances I have tried root login was disabled by default.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With