windows ssh remote login Ali goes wrong permissions are too open encounter of

When I tried to use ssh -i command telnet Ali cloud, encountered the following error:

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.

clipboard1

ssh version:

clipboard2

windows version:

clipboard3

Find a solution in this link:

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

clipboard4

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

clipboard5

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

clipboard6

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

clipboard7

After using the script ssh -i sapdis.pem [email protected]
successful login:

clipboard8

For more Jerry's original article, please pay attention to the public number "Wang Zixi":
公众号截图

Guess you like

Origin www.cnblogs.com/sap-jerry/p/12054568.html