Permissions for files in the user directory /home/user/.sshmust be 700, and /home/user/.ssh/authorized_keys- 600. Meanwhile, it is important that all the files in each directory .sshbelong to the user in whose home directory they are. To change ownership ownership recursively, you can:
chown -R username:username /home/username/.ssh
If you have multiple users, and you need to do this for each of them, you can use this loop:
for SSHUSER in user1 user2 user3 user4 user5; do
touch /home/$SSHUSER/.ssh/authorized_keys
chmod 600 /home/$SSHUSER/.ssh/authorized_keys
chmod 700 /home/$SSHUSER/.ssh
chown -R $SSHUSER:$SSHUSER /home/$SSHUSER/.ssh
done;