windows ssh远程登录阿里云遇到permissions are too open的错误

我试图用ssh -i 命令远程登录阿里云时,遇到如下错误:

Permissions for ‘private-key.ppk’ are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored.

windows ssh远程登录阿里云遇到permissions are too open的错误_第1张图片

ssh版本:

windows ssh远程登录阿里云遇到permissions are too open的错误_第2张图片

windows版本:

windows ssh远程登录阿里云遇到permissions are too open的错误_第3张图片

在这个链接里找到了解决方案:

:: Set Variable :: set key=“C:\Code\DKOM\ProlikeService\sapdis.pem” :: Remove Inheritance :: cmd /c icacls %key% /c /t /inheritance:d

windows ssh远程登录阿里云遇到permissions are too open的错误_第4张图片

:: Set Ownership to Owner :: cmd /c icacls %key% /c /t /grant %username%:F

windows ssh远程登录阿里云遇到permissions are too open的错误_第5张图片

:: Remove All Users, except for Owner :: cmd /c icacls %key% /c /t /remove Administrator “Authenticated Users” BUILTIN\Administrators BUILTIN Everyone System Users

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-jo0tK295-1576509916103)(https://user-images.githubusercontent.com/5669954/70841843-8543f480-1e58-11ea-939d-b47af860c565.png)]

:: Verify :: cmd /c icacls %key%

windows ssh远程登录阿里云遇到permissions are too open的错误_第6张图片

之后使用脚本ssh -i sapdis.pem [email protected]
登录成功:

windows ssh远程登录阿里云遇到permissions are too open的错误_第7张图片

要获取更多Jerry的原创文章,请关注公众号"汪子熙":
windows ssh远程登录阿里云遇到permissions are too open的错误_第8张图片

你可能感兴趣的:(开源)