0
0

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 1 year has passed since last update.

sshのキーの権限設定(Mac)

Posted at

経緯

  • Macを使ってscpを使おうとした
    • pemファイルの鍵を使ってアクセスしようとしている
  • 次のエラーが発生
...
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '.ssh/xxxxxxxxxxxxxx.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 ".ssh/xxxxxxxxxxxxx.pem": bad permissions
ubuntu@xx.xx.xx.xx: Permission denied (publickey).
lost connection
  • パーミッション0644は開きすぎやで というメッセージ
  • (´・ω・`)

対処

% chmod 600 .ssh/xxxxxxxxxxxx.pem
  • ヽ(´ー`)ノ

感想

Mac環境だからなのか、ファイルの権限がオープンすぎて失敗するパターンは初めてだったので記録。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?