- After login to your user, enter root session:
sudo -i- Edit SSHD config:
vi /etc/ssh/sshd_config1.a. Uncomment these lines:
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
- Restart sshd:
synoservicectl --restart sshd-
Enable homes dir in the users settings in teh Synology
-
Make homes dir readable by sshd
chmod 755 /volume1/homes/USERNAME- Login with ssh-copy-id for the first time or manually put your public key to the
.ssh/authorized_keysin your home folder
Useful links:
https://forum.synology.com/enu/viewtopic.php?t=126166
9. Configure the Synology’s SSH service to allow login by key(about troubleshooting with telnet)https://blog.aaronlenoir.com/2018/05/06/ssh-into-synology-nas-with-ssh-key/