経緯
- 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環境だからなのか、ファイルの権限がオープンすぎて失敗するパターンは初めてだったので記録。