SSH Key Authentication on Synology NAS
Solution 1:
Although none of the other answers directly fixed it, I took some of their methods and combined them.
This is what worked for me on my Synology DS414slim, running DSM 6.1.
I logged in as admin
and executed the following command (no need to fill in your username, it will work as-is):
This will set your home directory to 700
permission, owned by [you]:users
.
homedir=$(eval echo ~$USER);
sudo chown $USER:users $homedir -R;
chmod 700 $homedir;
chmod 700 $homedir/.ssh/;
chmod 600 $homedir/.ssh/authorized_keys;
Solution 2:
I got it working by following tips in the comments here: https://forum.synology.com/enu/viewtopic.php?t=90208
Short version, run chmod -R 755 ~
. Dir perms were too permissive (?!) for ssh to use public key authentication. No idea if this causes other conflicts, but it works.