windows ssh远程登录阿里云遇到permissions are too open的错误
我試圖用ssh -i 命令遠(yuǎn)程登錄阿里云時(shí),遇到如下錯(cuò)誤:
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.
ssh版本:
windows版本:
在這個(gè)鏈接里找到了解決方案:
:: Set Variable :: set key=“C:\Code\DKOM\ProlikeService\sapdis.pem” :: Remove Inheritance :: cmd /c icacls %key% /c /t /inheritance:d
:: Set Ownership to Owner :: cmd /c icacls %key% /c /t /grant %username%:F
:: Remove All Users, except for Owner :: cmd /c icacls %key% /c /t /remove Administrator “Authenticated Users” BUILTIN\Administrators BUILTIN Everyone System Users
:: Verify :: cmd /c icacls %key%
之后使用腳本ssh -i sapdis.pem root@39.XX.XXX.142
登錄成功:
要獲取更多Jerry的原創(chuàng)文章,請(qǐng)關(guān)注公眾號(hào)"汪子熙":
總結(jié)
以上是生活随笔為你收集整理的windows ssh远程登录阿里云遇到permissions are too open的错误的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: LOL图标如何点亮 英雄联盟图标点亮教程
- 下一篇: 如何判断某ABAP系统的Netweave