Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 have a Western Digital connected to my router at statically.

How can I automatically connect at login and rsync? At the moment I am using this command that doesn't work.

rsync -Paz /home/chris/

but I get this

ssh: connect to host port 22: Connection refused rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(605) [sender=3.0.9]

This screenshot of the Western Digital MyBookWorld control panel might help

EDIT: I updated the command to rsync -Paz -e ssh /home/chris/ as suggested and it works (I also enabled ssh from the control panel) but I would like to connect-rsync automatically (either by a cron job or during login no matter to me)

share|improve this question
Your command is not complete, try something like this: rsync -Paz -e ssh /home/chris/ root@ Does the Router support rsync? – prophecy201 Mar 13 '13 at 9:08
yes it supports ssh. That is why I gave this screenshot. It has some settings in it. I enabled SSH and now it works. Can I do this automatically without giving the password each time? – xpanta Mar 13 '13 at 9:21
That was not the question. The question ist, does ist support rsync? – prophecy201 Mar 13 '13 at 9:24
Try to set a authorized key to connect via ssh without a password. Here is some information about it:… – prophecy201 Mar 13 '13 at 9:29
Thank you. I have created public and private keys. However there is a control panel (see my screenshot) in the web interface of the Western Digital. Can/should I use this and copy-paste anything? Would that make it easier for me to rsync without giving password? – xpanta Mar 13 '13 at 10:06
up vote 2 down vote accepted

Your command is not complete, try something like this:

rsync -Paz -e ssh /home/chris/ root@

To connect to your Box without giving a Password create an authorized_key. You can find a Howto hiere:

Copy your public key in the "Key"-Field of you WC configuration. Don't change anything, just copy it like it is. When it works you should connect with your Key and you won't be asked for a password while connecting.

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.