Log in to your NAS using ssh: ssh -p the SSH server configuration file for editing: sudo vim /etc/ssh/sshd_configįind the following lines and uncomment them (remove the #): #RSAAuthentication yes So you should be able to skip this and jump to "Generate an SSH Key" Update september 2019: Thanks to "bogd" in the comments to point out Public Key Authentication is enabled by default even if the settings are commented out in sshd_config. If you use the default port of 22 you'll get a security warning later. Log in to the Synology Desktop and go to "Control Panel > Terminal & SNMP"Ĭheck "Enable SSH Service" and choose a non-default port. Thanks to "lvx" for this forum post with the solution: /enu/viewtopic.php?f=90&t=116726&p=441504#p427355! Setting up Key Based Authentication Normally Enable SSH Server The solution is to only allow read and execute to group and everyone: chmod 755 /volume1/homes/my-nas-user SSH doesn't allow that and throws an error while evaluating ssh key based login: Authentication refused: bad ownership or modes for directory /volume1/homes/my-nas-user The user's home directory, by default, has full read, write and execute permissions for everyone (777). If you already know how to normally set up ssh key authentication, here's the actual problem. DSM is the Operating System that runs on the NAS device. Sadly, I kept getting the request for a password. Make sure the public key is in ~/.ssh/authorized_keys.Make sure you have an SSH key on your client machine.Make sure you SSH daemon has Public Key Authentication enabled.Normally, setting this up is not a lot of work: In this post I explain how I made it work. I want to SSH into it using key-based authentication, but that seemed not supported by default. I bought a synology NAS at home to store some stuff.
0 Comments
Leave a Reply. |