在Linux中使用私钥进行ssh远程连接时,可能会出现这个问题,提示
Permissions 07xx/06xx for 'key_path' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "key_path": bad permissions
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
意思是私钥文件的权限错误,不使用私钥连接就会导致没有权限登录服务器,解决办法是将私钥文件降权:
chmod 0600 key_path
注意以上的key_path换成自己的私钥文件路径