Thread: rsync problem
View Single Post
Old 05-07-2004, 11:25 AM  
rickholio
Confirmed User
 
Industry Role:
Join Date: Jan 2004
Location: Nor'easterland
Posts: 1,914
The best way to handle this is to put your public key in the target server's "authorized_keys" file. It's pretty straightforward:

- If you haven't done so yet, generate a keypair for the account that will be doing the rsync:

(for ssh1): ssh-keygen -t rsa1
(for ssh2): ssh-keygen -t dsa

- Then copy the PUBLIC key (make sure it's the public half!) to the target machine and add it to the authorized key list.

(for ssh1):
scp ~/.ssh/identity.pub targetbox:/
ssh targetbox
cat /identity.pub >> ~targetuser/.ssh/authorized_keys

(for ssh2):
scp ~/.ssh/id_dsa.pub targetbox:/
ssh targetbox
cat /id_dsa.pub >> ~targetuser/.ssh/authorized_keys2

You can also rm the public key from the root dir of your target box, if you like.

After that, you should be able to simply do an ssh from your source box to your target box and it won't ask you for the password.

HTH. HAND.

Last edited by rickholio; 05-07-2004 at 11:26 AM..
rickholio is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote