Can't ssh to AWS EC2: Identity file not accessible

前端 未结 14 875
予麋鹿
予麋鹿 2021-02-02 06:08

I\'m unable to ssh to my EC2 server and am getting the error:

ssh -i /Users/Skeniver/Keepass/skeniver.pem ubuntu@xx.xxx.xx.xxx

Identity file /Users/Skeniver/Kee         


        
14条回答
  •  一生所求
    2021-02-02 06:27

    You need the identity file to login to the box. Use the command:

    ssh -i (identity_file) username@hostname"
    

    This worked for me. Write just the filename (without any slashes), unlike Amazon EC2 tutorial which asks you to enter:

    ssh -i /path/key_pair.pem ec2-user@public_dns_name
    

    It worked for me after putting the identity file in the .ssh (hidden) folder on home. To view hidden folders on home, use ctrl+h

提交回复
热议问题