Not able to login to EC2 running Oracle Linux(Custom AMI)

0

Hello Experts,
I am new to AWS and trying out migrating my OS(Oracle Linux 6) into AWS.
However,when i am trying to login to the EC2 ip, i am getting error message "Server refused our key". Not sure if this has anything related to improper migration that i did.I have given high level steps that i used to create a custom AMI.
I has used users "root","oracle"(OS users available in my on premise VM) & "ec2-user".How ever each time i got same login error. Could anyone help me in understanding what is wrong?

Creating Custom AMI:-

  1. Exported my Oracle Linux 6 VM as an ova file
  2. Copied that to S3 bucket
  3. After creating required roles and all,ran the ec2 import image function as below
    aws ec2 import-image --description "My Custom VM" --disk-containers "file://D:\containers.json"

where below is content of containers.json file

[
{
"Description": "My OELCustom OVA",
"Format": "ova",
"UserBucket": {
"S3Bucket": "mycustomami",
"S3Key": "Test.ova"
}
}]

  1. After the image import task was completed,I could see the new AMI in my AMI console section
  2. I spinned up a new Ec2 with this AMI having port 22 & other ports open for all traffic.
    PEM file was downloaded.
  3. The EC2 came in to RUnning status with all status checks completed without any issues.
SrnAws
질문됨 4년 전498회 조회
1개 답변
1

To solve this issue,create a public key in the source machine & connect to the ami after importing the public key to your aws account

SrnAws
답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠