ssh远程访问-提示密钥不安全

1.本地密钥不安全

[root@localhost httpd]# git clone git@git.oschina.net:xxxxx/aaaa.git
Cloning into 'aaaa'...
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

2.解决方案

chmod 600 id_rsa

posted @ 2017-04-09 13:24  有我在  阅读(730)  评论(0编辑  收藏  举报