LoginSignup
0
0

More than 3 years have passed since last update.

【EC2にssh接続時Permission deniedが出る】

Posted at

EC2接続時のエラーとその解決方法をメモ

Permissions 0644 for '〜.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 "〜.pem": bad permissions
ec2-user@iPアドレス.リージョン.compute.amazonaws.com: Permission denied ().

.pemファイルの権限がゆるいとエラーがでるらしいので、以下のコマンドで解決。

chmod 400 ~.pem

やっていること
一桁目 所有者
二桁目 グループ
三桁目 その他

数字の意味
4 読み取りのみ
2 書き込みのみ
1 実行のみ
0 全て禁止

つまり、400は所有者のみに、読み取り権限を与えている。

0
0
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
0
0