解决windows10中ssh(OpenSSH_for_Windows)远程登录时报Permissions for "xxx" are too open错误

ssh -i .\xxx.pem root@地址
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions for '.\\xxx.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key ".\\xxx.pem": bad permissions
root@地址: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

解决:

xxx.pem文件->属性->安全->高级->所有者改成当前操作用户->权限条目删除所有并添加当前操作用户

参考:

https://www.jianshu.com/p/629bf7a09a3d

https://www.jianshu.com/p/0bd91d523750

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章