Results 1 to 7 of 7

Thread: rsync help needed please

  1. #1
    Join Date
    Jun 2008
    Location
    /earth/europe/uk/england/west-yorkshire/leeds/mystreet/myhouse
    Posts
    248

    Default rsync help needed please

    Although I have read the man pages (although I admit, not ALL of it!) and can't seem to figure out the wood from the trees.

    Requirement:-
    Rsync files from one suse11.0 machine to another suse11.0 machine. The files are owned by root and need permissions to be maintained.

    Code:
    rsync -avz /srv/www/htdocs/ 192.168.1.223:/srv/www/htdocs
    Problem:-
    When run manually, it prompts for a password (remote root) ... when I enter the password it rsyncs OK.

    I read that I can use a password-file option which I tried but it said:-

    The --password-file option may only be used when accessing an rsync daemon.
    I want to automate this command by adding it into a cron job but without this password, it's not performing the task.

    Does anyone have any suggestions please how I can get around the problem??

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,291
    Blog Entries
    15

    Default Re: rsync help needed please

    Quote Originally Posted by badger fruit
    Although I have read the man pages (although I admit, not ALL of it!)
    and can't seem to figure out the wood from the trees.

    REQUIREMENT:-
    Rsync files from one suse11.0 machine to another suse11.0 machine. The
    files are owned by root and need permissions to be maintained.


    Code:
    --------------------
    rsync -avz /srv/www/htdocs/ 192.168.1.223:/srv/www/htdocs
    --------------------


    PROBLEM:-
    When run manually, it prompts for a password (remote root) ... when I
    enter the password it rsyncs OK.

    I read that I can use a password-file option which I tried but it
    said:-

    > The --password-file option may only be used when accessing an rsync
    > daemon.


    I want to automate this command by adding it into a cron job but
    without this password, it's not performing the task.

    Does anyone have any suggestions please how I can get around the
    problem??
    Hi
    What about using the ssh option and generate some keys?

    --
    Cheers Malcolm (Linux Counter #276890)
    openSUSE 11.2 Milestone 5 (i586) Kernel 2.6.31-rc5-git3-2-desktop
    up 8:24, 2 users, load average: 0.10, 0.21, 0.09
    ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME


  3. #3
    Join Date
    May 2009
    Location
    Jakarta, Beijing
    Posts
    77

    Default Re: rsync help needed please

    Hi,
    as stated in the previous post, you have to generate a public ssh key and copy it to the destination's authorized_keys, pls check this page:
    ssh Without a Password | OpenSUSE Linux Rants

    HTH
    "And just as you want men to do to you, you also do to them likewise."
    Luke 6:31 NKJV

  4. #4
    Join Date
    Jun 2008
    Location
    /earth/europe/uk/england/west-yorkshire/leeds/mystreet/myhouse
    Posts
    248

    Default Re: rsync help needed please

    hmm, i have followed the guide but it still prompts me for a password when i run the script or try to ssh?!

    i've ensured th permissions are correct as per OpenSSH FAQ but still no joy.

    Would it matter if I am trying to trying to do from server1/root to server2/root?

  5. #5
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,291
    Blog Entries
    15

    Default Re: rsync help needed please

    Quote Originally Posted by badger fruit
    hmm, i have followed the guide but it still prompts me for a password
    when i run the script or try to ssh?!

    i've ensured th permissions are correct as per 'OpenSSH FAQ'
    (http://www.openssh.com/faq.html#3.14) but still no joy.

    Would it matter if I am trying to trying to do from server1/root to
    server2/root?
    Hi
    Is the sshd_config file modified ok to allow root login and have you
    restarted the sshd daemon?

    Look at the logs (messages) to see what it's saying

    --
    Cheers Malcolm (Linux Counter #276890)
    SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.25-0.1-default
    up 9 days 18:25, 2 users, load average: 2.50, 2.67, 2.43
    GPU GeForce 8600 GTS Silent - Driver Version: 190.18


  6. #6
    Join Date
    Jun 2008
    Location
    /earth/europe/uk/england/west-yorkshire/leeds/mystreet/myhouse
    Posts
    248

    Default Re: rsync help needed please

    Yes, sshd is restarted and root allowed (i can ssh manually from computer1 to computer2 using root).

    Ah, the logs - how I forget how useful they are!

    Code:
    Aug 14 16:26:54 bgrsvr-w sshd[20155]: error: buffer_get_ret: trying to get more bytes 129 than in buffer 69
    Aug 14 16:26:54 bgrsvr-w sshd[20155]: error: buffer_get_string_ret: buffer_get failed
    Aug 14 16:26:54 bgrsvr-w sshd[20155]: error: buffer_get_bignum2_ret: invalid bignum
    Aug 14 16:26:54 bgrsvr-w sshd[20155]: error: key_from_blob: can't read dsa key
    Aug 14 16:26:54 bgrsvr-w sshd[20155]: error: key_read: key_from_blob ########################\n failed
    Aug 14 16:26:54 bgrsvr-w sshd[20155]: error: buffer_get_ret: trying to get more bytes 129 than in buffer 69
    Aug 14 16:26:54 bgrsvr-w sshd[20155]: error: buffer_get_string_ret: buffer_get failed
    Aug 14 16:26:54 bgrsvr-w sshd[20155]: error: buffer_get_bignum2_ret: invalid bignum
    Aug 14 16:26:54 bgrsvr-w sshd[20155]: error: key_from_blob: can't read dsa key
    Aug 14 16:26:54 bgrsvr-w sshd[20155]: error: key_read: key_from_blob ########################\n failed
    I'm going back to re-read that guide and see if somehow I messed up!!

    In the meantime, please any more suggestions are appreciated!

  7. #7
    Join Date
    Jun 2008
    Location
    /earth/europe/uk/england/west-yorkshire/leeds/mystreet/myhouse
    Posts
    248

    Default Re: rsync help needed please

    Bah! Silly VIM (ahem, of course, it was VIM's fault and not mine!)

    The key I had copied into the authorized_keys file has line breaks in it (hence I think the \n in the messages file), I removed them so it was all on one line and now ... IT WORKS!!

    Thank you for suggestions and links!
    <<< RESOLVED >>>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •