0

I have a Synology NAS and a Raspberry PI and I would like to share a folder from my Synology to my Raspberry.

The naive solution is to use NFS, unfortunately no passwords, certificates. NFS seems to be accessible by anyone that get the same MAC address of my Raspberry.

The dirty solution is to install Samba.

What alternative can I use to securely share a folder that requires a password or even better, keys to mount the shared folder?

2

UPDATED:

In fact, Synology's "Cloud Station Drive" is available for Linux so it should be possible to get that working. It is available from the downloads on the Synology site.

As you have pointed out, you can use SSHFS to mount a remote folder into a local file system so that is also a possibility. You can easily install that to your Pi with:

sudo apt-get install sshfs

Other possibilities would be using WebDAV, BitTorrent Sync or similar tools. You could even use Dropbox as an intermediary as the NAS supports that and can sync with it (not as secure of course).

UPDATE 2:

To be able to use SSH and SFTP on the NAS, you need to turn it on in the control panel. Something like:

Enable the SSH service by checking the Control Panel → 
"Terminal & SNMP" menu → "Terminal" tab → 
"Enable SSH service" checkbox.

Enable the SFTP service (not to be confused with FTPS!) 
by checking the Control Panel → "File Services" menu → 
"FTP" tab → "SFTP" group → "Enable SFTP service" checkbox.`

Then make sure you have a suitably accessible folder for the userid you use to connect from the Pi. I think that you also need to turn on the user home service so that you get the right permissions for users other than admin or root. Some additional information is here.


The simple answer is surely SSH. This is available on both platforms and supports both password and certificate based login.

It isn't, of course, as seamless as using SAMBA or NFS but you can use rsync or some tool based on rsync to synchronise a local and remote folder.

This article from Synology shows you how to configure rsync - it is frames as a backup but it is easy enough to use 2-way sync.

  1. On the NAS, open Backup & Replication. Go to Backup Services > Network Backup Destination, and then tick Enable network backup service.
  2. On the Pi, run something like

    rsync -av -e ssh home/ admin@192.168.55.66::NetBackup/backupdata/

As I say, not as good as a network mount but not too bad. Of course, that example is for a one-off sync, you should put that into cron or better yet, run a sync daemon of some kind.

  • SSHFS is not available out of the box on Synology :( – nowox Jan 22 '17 at 17:53
  • I don't think you need it on the Synology. You want it on the pi surely? You are mounting the Synology folder into the Pi's file system. – Julian Knight Jan 22 '17 at 17:55
  • I tried on the pi, but it doesn't work. google says I have to install ipkg or opkg first :( so for reasonable network mount I am stuck to NFS and SAMBA :( – nowox Jan 22 '17 at 17:58
  • OK, see my other possibilities too. And don't forget that you can still use rsync. Oh, and you can install ipkg on the Synology. Did it ask for that on the Pi or on the NAS? – Julian Knight Jan 22 '17 at 18:00

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.