windows ssh遠端登入阿里雲遇到permissions are too open的錯誤

i042416發表於2019-12-16

我試圖用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的錯誤

ssh版本:

windows ssh遠端登入阿里雲遇到permissions are too open的錯誤

windows版本:

windows ssh遠端登入阿里雲遇到permissions are too open的錯誤

在這個連結裡找到了解決方案:

:: 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的錯誤

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

windows ssh遠端登入阿里雲遇到permissions are too open的錯誤

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

windows ssh遠端登入阿里雲遇到permissions are too open的錯誤

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

windows ssh遠端登入阿里雲遇到permissions are too open的錯誤

之後使用指令碼ssh -i sapdis.pem  root@39.XX.XXX.142
登入成功:

windows ssh遠端登入阿里雲遇到permissions are too open的錯誤

要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":

windows ssh遠端登入阿里雲遇到permissions are too open的錯誤


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2668893/,如需轉載,請註明出處,否則將追究法律責任。

相關文章