LoginSignup
5
3

More than 5 years have passed since last update.

AWSで作成したインスタンスにSSHで接続できないとき

Posted at

環境

  • MacOS 10.12.6

AWSのインスタンス作成後にSSHコマンドで接続しようとした時に

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for 'my-keypair.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 "my-keypair.pem": bad permissions
Permission denied (publickey).

となる場合がある。これは、使おうとしているキーペアのパーミッションレベルが甘すぎだよ、もっと絞って、と言っているのである。

$ chmod 600 my-keypair.pem

とすることでsshコマンドが通るようになる。

5
3
0

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
5
3