问题描述
今天在虚拟机上拷贝本地的密钥文件,之后进行测试ssh -T git@github.com 测试连接是否通畅的时候提示:
Permissions 0664 for '/hone/latch/.ssh/id_rsa' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
key_load_private_type: bad permissions
Permission denied (publickey).
解决方法1
很明显,问题说明的是id_rsa文件的权限太开放了,需要减少其权限。执行命令:
sudo chmod 400 id_rsa