Personal website of yuan 王远的个人网站.


wangyuan / 2019-01-28


[root@hadoop0 ~]# scp -i /root/id_rsa xuepeng@ ~
Permissions 0644 for '/root/id_rsa' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/root/id_rsa": bad Permission denied (publickey,gssapi-keyex,gssapi-with-mic).



You changed the permissions on the whole directory, which I agree with Splash is a bad idea. If you can remember what the original permissions for the directory are, I would try to set them back to that and then do the following

cd ~/.ssh
chmod 700 id_rsa

inside the .ssh folder. That will set the idrsa file to rwx (read, write, execute) for the owner (you) only, and zero access for everyone else. If you can’t remember what the original settings are, add a new user and create a set of SSH keys for that user, thus creating a new .ssh folder which will have default permissions. You can use that new .ssh folder as the reference for permissions to reset your .ssh folder and files to. If that doesn’t work, I would try doing an uninstall of msysgit, deleting ALL .ssh folders on the computer (just for safe measure), then reinstalling msysgit with your desired settings and try starting over completely (though I think you told me you tried this already). Edited: Also just found this link via Google – [Fixing “WARNING: UNPROTECTED PRIVATE KEY FILE!” on Linux](!%22_on_Linux) While it’s targeted at linux, it might help since we’re talking liunx permissions and such


  chmod 700 id_rsa
  [root@hadoop0 ~]# ll -h id_rsa*
  -rwx------ 1 root root 1.7K 1月  28 08:56 id_rsa
  -rw-r--r-- 1 root root  418 1月  28 09:35