SSH EC2 asking for password

后端 未结 16 1356
伪装坚强ぢ
伪装坚强ぢ 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:33

    I am using TurboLinux instance, on Mac OS system, please try this command: ssh -i xxxxx.pem root@xxx.xxx.xxx.xxx (public address of allocated VM) I can get through without asking password anymore.

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

    If you've moved/copied the pem file from another machine, the owner of the file may be different to the user that is running the ssh client. To change the owner of the file:

    sudo chown <currentusername> <filename.pem>
    
    0 讨论(0)
  • 2020-12-24 06:38

    Please use --query 'KeyMaterial' while generating key.

    Info:

    keyMaterial - an unencrypted PEM encoded RSA private key.

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

    It could be a Linux problem. But there is also a chance that you use the wrong address/key (you started a new instance but still using the old address; or 2 pem have similar name, used the wrong one), "ssh with non-existing user".

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

    In my case, we had been copying a text file to keep a ubiquitous key. Someone accidentally added characters to this file, and we started getting prompted for a password from the now-corrupt .pem file, when we had never set a password.

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

    In case someone else bumps into this, the solution for my problem was that I had to run it with sudo:

    sudo ssh -i my-pem-file.pem root@my-ec2-instance-address
    
    0 讨论(0)
提交回复
热议问题