Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a Western Digital connected to my router at 192.168.1.65 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/ 192.168.1.65:LinuxHome/

but I get this

ssh: connect to host 192.168.1.65 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

https://dl.dropbox.com/u/2423935/wd.png

EDIT: I updated the command to rsync -Paz -e ssh /home/chris/ 192.168.1.65:LinuxHome/ 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
1  
Your command is not complete, try something like this: rsync -Paz -e ssh /home/chris/ root@192.168.1.65:/LinuxHome/ 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
1  
Try to set a authorized key to connect via ssh without a password. Here is some information about it: sshkeychain.sourceforge.net/mirrors/SSH-with-Keys-HOWTO/… –  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

1 Answer 1

up vote 2 down vote accepted

Your command is not complete, try something like this:

rsync -Paz -e ssh /home/chris/ root@192.168.1.65:/LinuxHome/

To connect to your Box without giving a Password create an authorized_key. You can find a Howto hiere: http://sshkeychain.sourceforge.net/mirrors/SSH-with-Keys-HOWTO/SSH-with-Keys-HOWTO-4.html

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

 
discard

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.