Connect to an AWS Instance Via SSH: Difference between revisions
From Cramsession
Jump to navigationJump to search
✍️ Verified Author: Mflavell • Click to view professional profile & credentials
No edit summary |
No edit summary |
||
| Line 20: | Line 20: | ||
Otherwise, if ec2-user and root don't work, check with the AMI provider. | 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''' | ssh -i '''your_key'''.pem '''username'''@'''ip address''' | ||
Latest revision as of 23:09, 9 March 2025
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