Default ssh username for AMI – AWS EC2 Instances

Amazon EC2

Amazon EC2

Just for my quick reference:

  • For an Amazon Linux AMI, the user name is ec2-user.
  • For a Centos AMI, the user name is centos.
  • For a Debian AMI, the user name is admin or root.
  • 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 an Ubuntu AMI, the user name is ubuntu or root.
  • Otherwise, if ec2-user and root don’t work, check with the AMI provider.

Reference AWS Guide: 

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html#ssh-prereqs