Published December 22, 2017 by

Default ssh Usernames For AWS EC2 Instances

Each AMI publisher on EC2 decides what user should have ssh access enabled by default and what ssh credentials should allow you to gain access as that user.

For the second part, most AMIs allow you to ssh in to the system with the ssh keypair you specified at launch time. This is so common, users often assume that it is built in to EC2 even though it must be enabled by each AMI provider.


Unfortunately, there is no standard ssh username that is used to access EC2 instances across operating systems, distros, and AMI providers.


Here are some of the ssh usernames that I am aware of at this time:



OS
Username
Amazon Linux
ec2-user
Ubuntu
ubuntu
Debian
admin
RHEL 6.4 and later
ec2-user
RHEL 6.3 and earlier
root
Fedora
fedora
Centos
centos
SUSE
root
Bitnami
bitnami
Turnkey
root
NanoStack
ubuntu
FreeBSD
ec2-user
OmniOS
root


Even though the above list will get you in to most official AMIs, there may still be situations where you aren’t quite sure how the AMI was built or what user should be used for ssh.