24
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

awsにssh接続が拒否された。

Last updated at Posted at 2018-08-02
$ ssh -i aws-ssh-key.pem ec2-user@[IPaddress]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for 'aws-ssh-key.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "aws-ssh-key.pem": bad permissions
ec2-user@[IPaddress]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
グーグル翻訳
'aws-ssh-key.pem'のパーミッション0644があまりにも開いています。
秘密鍵ファイルには他の人がアクセスできないようにする必要があります。
この秘密鍵は無視されます。
読み込みキー "aws-ssh-key.pem":不正なアクセス許可
ec2-user@[IPアドレス]:許可が拒否されました(publickey、gssapi-keyex、gssapi-with-mic)。

##結論
Permissions 0644 for 'aws-ssh-key.pem' are too open.という文字通りアクセス権限が問題。
なので、$ chmod 700 aws-ssh-key.pemとすれば、問題解決。

$ ssh -i aws-ssh-key.pem ec2-user@[IPaddress]

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

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

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
24
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?