Connect to an AWS Instance Via SSH
From Cramsession
✍️ Verified Author: Mflavell • Click to view professional profile & credentials
Create and Download a .PEM file for the instance
Follow the instructions by Amazon
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/connect-linux-inst-ssh.html
Make sure you are using the right username
For Amazon Linux 2 or the Amazon Linux AMI, the username is ec2-user. For a CentOS AMI, the user name is centos. For a Debian AMI, the user name is admin. For a Fedora AMI, the user name is ec2-user or fedora. For a RHEL AMI, the user name is ec2-user or root. For a SUSE AMI, the user name is ec2-user or root. For a Ubuntu AMI, the user name is ubuntu. For an Oracle AMI, the user name is ec2-user. For a Bitnami AMI, the user name is bitnami. Otherwise, if ec2-user and root don't work, check with the AMI provider.
Try to connect
ssh -i your_key.pem username@ip address