Authorized SSH Keys on Synology DSM

Enabling authorized SSH keys on the Synology DSM has thrown me for a loop twice, so I’m going to write this down.

The default permissions on home directories look as follows:

$ ls -la
total 0
drwxrwxrwx+ 1 acrawford users   48 Dec  4 19:18 .
drwxrwxrwx+ 1 root      root   128 Oct 27 22:17 ..

Since sshd requires proper permissions on directories, those on the home directory need to be corrected:

$ chmod go-w .
$ ls -laR
.:
total 0
drwxr-xr-x  1 acrawford users   48 Dec  4 19:18 .
drwxrwxrwx+ 1 root      root   128 Oct 27 22:17 ..
drwx--x--x  1 acrawford users   30 Dec  4 19:19 .ssh

./.ssh:
total 4
drwx--x--x 1 acrawford users 30 Dec  4 19:19 .
drwxr-xr-x 1 acrawford users 48 Dec  4 19:18 ..
-rw------- 1 acrawford users  0 Dec  4 19:20 authorized_keys