SSH EC2 asking for password

后端 未结 16 1370
伪装坚强ぢ
伪装坚强ぢ 2020-12-24 05:45

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

相关标签:
16条回答
  • 2020-12-24 06:43

    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!

    0 讨论(0)
  • 2020-12-24 06:44

    You should use the *.pem instead of a root password. Once you have logged in use passwd to set a password.

    0 讨论(0)
  • 2020-12-24 06:45

    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

    0 讨论(0)
  • 2020-12-24 06:45

    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

    0 讨论(0)
提交回复
热议问题