56
28

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.

sshしようとしてIt is required that your private key files are NOT accessible by others. This private key will be ignored.が出た時の対応

Last updated at Posted at 2019-12-17

こんなエラーが出た時の対処方法です。

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for ‘/Users/XXX/.ssh/sample.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 "/Users/XXX/.ssh/sample.pem": bad permissions
ec2-user@XX.XXX.XXX.XX: Permission denied (publickey).

##対処法として

秘密鍵ファイルは他からアクセスできないことが必要と怒られているので、
permissionを変更してあげます。

$sudo chmod 0600 sample.pem

これで無事sshすることが出来ました。

56
28
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
56
28

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?