我正在尝试使用我的 .pem 文件登录到我的盒子,但是我收到了错误
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0555 for './arete-server.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: ./arete-server.pem
Permission denied (publickey).
chmod 400 在 Windows 上的 Ubuntu 上的 Bash 上不起作用,我可以给它的最佳权限是 -r-xr-xr-x
知道如何获得可以使用此 pem 文件的权限吗?
最佳答案
在 WSL 上,chmod 不适用于 Windows 使用的 NTFS 分区。您需要将 .pem 文件移动到 Linux 容器中的一个分区(例如主文件夹),然后 chmod 400 将起作用。
- 导航到 NTFS 文件夹,例如:cd/mnt/c/keyfiles
- 将 .pem 文件移动到您的主文件夹:mv key.pem ~
- 导航到您的文件夹:cd ~
- 申请权限:chmod 400 key.pem
关于windows - Windows 上 Ubuntu 上 Bash 上的 pem 文件权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39404087/