perm for .ssh is 700 , perm authorized_keys 644 – Ali firouzbakhsh 1 min ago
O ~/.ssh/authorized_keys
não pode ser gravável por mais ninguém, conforme mencionado na página de manual de sshd
:
~/.ssh/authorized_keys
Lists the public keys (DSA, ECDSA, Ed25519, RSA) that can be used for logging in as this user. The format of this file is described above. The content of the file is not highly sensitive, but the recommended permissions are read/write for the user, and not accessible by others.
If this file, the ~/.ssh directory, or the user's home directory are writable by other users, then the file could be modified or replaced by unauthorized users. In this case, sshd will not allow it to be used unless the StrictModes option has been set to “no”.
Altere as permissões para 600
:
chmod 600 /home/user/.ssh/authorized_keys
Eles também precisam ser de propriedade do usuário, não da raiz:
chown user:user /home/user/.ssh/ /home/user/.ssh/authorized_keys