SSH登录服务器 Permissions 0644 for 'xxx.pem' are too open
使用 SSH 连接到 阿里云ECS服务器时遇到错误:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for 'x.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 "x.pem": bad permissions
这是因为从ECS下载的私钥默认权限太大,需要将其权限改为只读且仅当前用户可见:
chmod 400 x.pem