I recently became responsible for administering several Amazon Web Services Elastic Cloud Computing instances, some of which run Ubuntu and some of which run Amazon Linux. I have the key pair as a .pem file. What is the username I should use when connecting via SSH?

1 Answer 1


It is different for different distributions. The default user for Amazon Linux is ec2-user.

The default user for Ubuntu is ubuntu.

This is documented at amazon:


  • Perfect. Knowing that, ssh -i mykey.pem ec2-user@myinstance.amazonaws.com got me in.
    – amacleod
    Jul 17, 2014 at 23:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.