EC2 uses public key cryptography to protect login credentials
Key pair - public key and a private key
Public key is stored in EC2 instance
Connecting to EC2 instance(s) - Troubleshooting:
You need to have the private key with you
Change permissions to 0400 (chmod 400 /path/my-key-pair.pem)
Default permissions on private key - 0777 (VERY OPEN)
(Windows Instances) In addition to private key, you need admin password
(At Launch) Random admin password is generated and encrypted using public key
Decrypt the password using the private key and use it to login via RDP
Security Group should allow inbound SSH or RDP access:
Port 22 - Linux EC2 instance (SSH)
Port 3389 - RDP (Remote Desktop - Windows)