It is required that your private key files are NOT accessible by others.

[已解决]Permissions for .ssh/xxx are too open.It is required that your private key files are NOT accessible by others.linux ssh密钥权限问题。

使用ssh方式连接远程时提示:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@     WARNING: UNPROTECTED PRIVATE KEY FILE!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/root/.ssh/id_key' 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/.ssh/id_key": bad permissions
Permission denied (publickey).
fatal: Could not read from remote repository.

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

解决方法

chmod 600 .ssh
chmod 400 .ssh/authorized_keys

说明:当前用户的.ssh目录或密钥文件的权限过大所致,使用chmod命令修改目录和文件权限,authorized_keys为具体的密钥文件。

若依然有问题,参考ssh免密登录配置