🗂

【aws】SSHにてAWSにあるインスタンスにログインできない時の対処法

2021/07/27に公開
ssh -i my-key.pem ec2-user@54.249.66.225           2021-07-27 04:56:34
Warning: Identity file my-key.pem not accessible: No such file or directory.
Warning: Permanently added '54.249.66.225' (ECDSA) to the list of known hosts.
ec2-user@54.249.66.225: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

フルパスを指定

ssh -i ~/Downloads/my-key.pem ec2-user@54.249.66.225
Warning: Permanently added '54.249.66.225' (ECDSA) to the list of known hosts.
Last login: Tue Jul 27 04:52:01 2021 from m106072036034.v4.enabler.ne.jp

       __|  __|_  )
       _|  (     /   Amazon Linux 2 AMI
      ___|\___|___|

https://aws.amazon.com/amazon-linux-2/
55 package(s) needed for security, out of 78 available
Run "sudo yum update" to apply all updates.
[ec2-user@ip-10-0-1-10 ~]$ 
[ec2-user@ip-10-0-1-10 ~]$ 

https://qiita.com/vinaka/items/1d8b20fdf8a9234bc86d

Discussion