I\'ve just setup my EC2 server following this video here exactly - http://www.youtube.com/watch?v=bBajLxeKqoY
I even chose the same server type, everything went well
I had the same problem and after a lot of struggle, I read this page again:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html
Notice in the 4th topic it talks about the user name. It is usually ec2-user
but if you are using RHEL5 distro it can be root
and if you are using the Ubuntu the user name will be ubuntu
- which was my case.
So alternatively try those:
ssh -i my-pem-file.pem ubuntu@my-ec2-instance-address
for Ubuntu
or
ssh -i my-pem-file.pem root@my-ec2-instance-address
for RHEL5
Hope it helps!
You should use the *.pem instead of a root password. Once you have logged in use passwd
to set a password.
If you need to do things as root once you are in as ec2-user, use sudo su
- that gets you to root and doesn't need a password. Somethings you do need that for, like looking at the tomcat log files
In my case, the problem was the file's break type. Try this:
1.- Open the .pem file with TextWrangler
2.- At Bottom of app, verify if the Break Type is "Windows(CRLF)".
Regards