Find the answer to your Linux question:
Results 1 to 5 of 5
Hi!, Need some help with rsync between redhar 5.4 servers. I have 2 servers - (server1 and server2) - created private and public keys on server1 and copied the id_rsa.pub ...
  1. #1
    Just Joined!
    Join Date
    Jan 2011
    Posts
    7

    [SOLVED] Basic Rsync

    Hi!,
    Need some help with rsync between redhar 5.4 servers.
    I have 2 servers - (server1 and server2) - created private and public keys on server1 and copied the id_rsa.pub keys to authorized_keys on destination server2.
    The script is working fine (running withour password) via rsync from server1 to server2.

    Now I have another request to run a script from server2 to server1.
    My questions are:
    1) Do I need to create another set of private/public keys on server2 and copy over .pub key to authorized_keys file on server1?

    2) If not - how do I rsync from server2 to server1 without prompting for password?

    Appreciate your help
    Many thanks
    Ven

  2. #2
    Just Joined!
    Join Date
    Jan 2011
    Posts
    8
    yes and no, it depends on what server you are running the rsync command from.

    if you want to be able to run rsync from one machine to another from either machine, you will need to set up ssh key authentication for both machines.

    however, strictly speaking, for two servers, you only need to set it up for one machine provided you always run your rsync command from that machine.

  3. #3
    Just Joined!
    Join Date
    Jan 2011
    Posts
    7

    Basic rsync

    thank you for your reply,

    yes now the requirement is to run rsync from server2 to server1
    So accoridign to your reply - I need to setup ssh keys on server2 as well and copy over to server1.
    I presume my keys on server2 have to be named different. Because in server1 I have taken the default names as id_rsa and id_ras.pub.
    Pl correct me if my understanding is wrong.

    Ven
    Last edited by hugo73; 01-24-2011 at 06:50 PM.

  4. #4
    Just Joined!
    Join Date
    Jan 2011
    Posts
    8
    they can have the same file names because the keys are on different machines. you can use the exact same procedure to set up the ssh key authentication on the second server. thus, now server1's authorized_keys file will contain the id_rsa.pub from server2.

  5. #5
    Just Joined!
    Join Date
    Jan 2011
    Posts
    7
    Many thanks my friend - its working fine now. Thanks a lot for all your help.
    Appreciate it.
    Ven

Posting Permissions

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