Skip to content

Instantly share code, notes, and snippets.

@patrickhlauke
Forked from seignovert/README.md
Created July 20, 2021 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patrickhlauke/18f10d514a52de9b1fc587fe5e7e172e to your computer and use it in GitHub Desktop.
Save patrickhlauke/18f10d514a52de9b1fc587fe5e7e172e to your computer and use it in GitHub Desktop.
Enable RSync with Synology DSM 6.0 without RSA SSH-key

Enable RSync with Synology DSM 6.0 without RSA SSH-key

##Enable user home service Open the Control panel, in the User section go to Advanced tab and in the section User Home:

  • Enable user home service Click Apply

##Enable SSH Go to Terminal & SNMP section and:

  • Enable SSH service And choose the PORT that you want to use.

[Optional] You can change the default security level in Advanced settings to high.

Click Apply

##Activate RSync Go to File Services in rsync tab.

  • Enable rsync service You could use the same PORT as SSH or choose a new one only for rsync.

##Create SSH key You need to create private/public keys on your local computer if you don't already have some:

ssh-keygen -t rsa

Validate by pressing ENTER with an empty passphrase. Then change the right access:

chmod 700 ~/.ssh && chmod 600 ~/.ssh/*

And send the public key to your NAS:

ssh-copy-id -i ~/.ssh/id_rsa.pub -p SSH_PORT ADMIN_USER_ONLY@XXX.XXX.XXX.XXX

##Enable the SSH key Connect to you NAS with ssh with your password:

ssh -p SSH_PORT ADMIN_USER_ONLY@XXX.XXX.XXX.XXX

And change the right access on the key and the user folder:

chmod 700 ~/.ssh && chmod 600 ~/.ssh/*
chmod u=rwx,g=rx,o=rx /volume1/homes/ADMIN_USER_NAME/

Then you should be able to connect with ssh only with your SSH-key (without password):

ssh -p SSH_PORT ADMIN_USER_ONLY@XXX.XXX.XXX.XXX

##Check the rsync connection Now you should be able to connect also with rsync:

rsync -av -e 'ssh -p PORT_RSYNC' ORIGIN/FOLDER/TO/SYNC/ USER@XXX.XXX.XXX.XXX:/volume1/homes/USERNAME/DESTINATION/FOLDER/

Then, if you want you can disable the SSH access without loosing rsync:

  • Enable SSH service

You can even remove the user from the admin group.

##Source: NAS-Forum (FR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment