Chúng ta có thể truy cập bằng lệnh: ssh -i PRIVATE_KEY.PEM ec2-user @ EC2_PUBLIC_DNS_NAME
ssh-keygen
aws ec2 import-key-pair --key-name "mythicaleks" --public-key-material file://~/.ssh/id_rsa.pub
Nếu gặp lỗi An error occurred (InvalidKey.Format) when calling the ImportKeyPair operation: Key is not in valid OpenSSH public key format, bạn có thể thử lệnh sau:
aws ec2 import-key-pair --key-name "mythicaleks" --public-key-material fileb://~/.ssh/id_rsa.pub