Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I´ve a Synology DS213 J Nas System. I´m trying to sync folders from a ubuntu 12.04 webserver to the nas without password prompt. therefore I logged into the nas via terminal with root account.

Created the ssh dir /root/.ssh

$ mkdir /root/.ssh

created the keys with

   $ ssh-keygen

-> with empty paraphrase

Thus ssh-copy-id is not working on the synology nas i copied the by hand to the ubuntu machine

$ cat

Copy and paste it on ubuntu Server to

$ ~/.ssh/

and "cated" the file into authorized_keys

$ cat ~/.ssh/ >> authorized_keys

/etc/ssh/sshd_config is set to

has RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile      %h/.ssh/authorized_keys

Unfortunately If I´m trying an rsync I´m asked for the empty paraphrase and the password for the ubuntu machine. helpful for any hint,


share|improve this question
Thanks, your tipp with the correct directory did it, the key resisted in the wrong place. – t Book Feb 3 '14 at 15:38
up vote 0 down vote accepted

You probably mixed up usernames and authorized keys.

  1. Does 'cat ~/.ssh/ >> authorized_keys' actually put your key into '~/.ssh/authorized_keys' where it should be, and NOT into '~/authorized_keys'?

  2. have you tried to ssh (not rsync) to the webserver from your NAS? Which username do you use to run rsync/ssh from rsync? Did you put your key into .ssh/authorized_keys for THAT username?


You should have a user that runs rsync command on NAS. Let's call him 'userNAS'. The 'ssh-keygen' should be run by this user. Then you need a public key of this user, /home/userNAS/.ssh/

This step probably worked fine for you, I assume you used root user for it. However, it's not clear from your question how have you executed '$ mkdir /root/.ssh', as '$' shows that you are not root.

Next, you need to be able to login via ssh on the Webserver. For this, you should have another user on the webserver, let's call him 'userWeb'. Now you need to copy the public key of 'userNAS' from your NAS to the 'authorized_keys' of user 'userWeb' on your webserver. E.g., to '/home/userWeb/.ssh/authorized_keys'.

Now you should be able to run 'ssh' as 'userNAS' on your NAS and login to webserver as user 'userWeb'. However, if your user on the webserver is also root, ssh will not allow it to log in. Check the separate option in ssh configuration to enable root logins via ssh. However, this is not recommended.

Finally, rsync should have an option telling it, that it should login as 'userWeb' on the webserver. Something like '-e ssh'

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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