Can the rsync password be automated?

Shane Uys shaneuys at uys.net
Mon Aug 18 12:59:36 GMT 2008


Hey Guys, This works great. Thanks a lot.


From: Julian Pace Ross [mailto:linux at prisma.com.mt] 
Sent: Monday, August 18, 2008 3:03 AM
To: Shane Uys
Subject: Re: Can the rsync password be automated?

Shane,
 
For the first option Shachar mentioned, just:
 
1) Generate the keys as described here
http://optics.ph.unimelb.edu.au/help/rsync/rsync_pc1.html (you can do
this on a linux machine, then just copy the public key file to the
windows pc, and leave the private key in the default directory (i think
that should be "./.ssh/) .. 
 
2) from the command line , do rsync - e "ssh -i publickeyfile -l
username" etc 
 
Follow the link above and you should be fine.
 
Hope this helps
Julian


-----Original Message-----
From: Shachar Shemesh [mailto:shachar at shemesh.biz] 
Sent: Monday, August 18, 2008 1:03 AM
To: Shane Uys
Cc: rsync at lists.samba.org
Subject: Re: Can the rsync password be automated?

The official and recommended way of solving this issue is to perform 
public key authentication with the ssh server. You are right that the 
--password-file option does not work when running rsync over ssh. Public

key authentication solves your problem, and does not significantly 
reduce the security of your system.

There is another option, but only go that route if you have tried 
setting up public key authentication and failed for a reason over which 
you have no control. If your server supports public key authentication, 
do not continue to the next option. Only consider it if the 
administrator for the server to which you want to connect has disabled 
public key authentication and cannot be persuaded to change her mind.

There is a tool called "sshpass". It is available at 
http://sourceforge.net/projects/sshpass/. Read about it at 
http://www.debianadmin.com/sshpass-non-interactive-ssh-password-authenti
cation.html

Shachar


More information about the rsync mailing list