Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1293792
  • 博文数量: 932
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 10208
  • 用 户 组: 普通用户
  • 注册时间: 2011-07-08 12:28
文章分类

全部博文(932)

文章存档

2021年(1)

2020年(134)

2019年(792)

2018年(5)

我的朋友

分类: 架构设计与优化

2019-12-18 20:42:14

我试图用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.

ssh版本:

windows版本:

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

:: 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的原创文章,请关注公众号"汪子熙":

阅读(1113) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~