##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
ClickApply
##Enable SSH
Go to Terminal & SNMP
section and:
-
Enable SSH service
And choose thePORT
that you want to use.
[Optional] You can change the default security level in
Advanced settings
tohigh
.
Click Apply
##Activate RSync
Go to File Services
in rsync
tab.
-
Enable rsync service
You could use the samePORT
asSSH
or choose a new one only forrsync
.
##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 [email protected]
##Enable the SSH key
Connect to you NAS with ssh
with your password:
ssh -p SSH_PORT [email protected]
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 [email protected]
##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/ [email protected]:/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)
Works like a charm, thank you!
DSM: 6.2.2-24922 Update 4
Client: Ubuntu 18.04.4 LTS "bionic"