我得到了一个 key.pem 文件,权限是 664。我用
ssh -i key.pem xxx.xxx.xxx.xxx -l ec2-user
登录到 ec2 实例。但是返回了一个错误:
Permissions 0664 for '/path/to/key.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
然后我尝试了400,它给了我
Permission denied (publickey).
应该设置 key.pem 的什么权限才能 ssh 到 ec2?
提前谢谢:)