ssh “permissions are too open” error

其他主机的id_rsa, id_rsa.pub拷贝到本机后, ssh 免密登录其他主机出现报错

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/root/.ssh/id_rsa' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /root/.ssh/id_rsa

 解决方法:

Keys need to be only readable by you:

chmod 400 ~/.ssh/id_rsa
If Keys need to be read-writable by you:

chmod 600 ~/.ssh/id_rs

 参考文档:

https://stackoverflow.com/questions/9270734/ssh-permissions-are-too-open-error

posted @ 2020-03-25 14:29  Oops!#  阅读(458)  评论(0)    收藏  举报