Néstor wrote:
> When running the rsync command to copy files from one host to another how do
> I pass teh password?
> 
> This is my command:
> rsync -avz  host1:/home/www/ /home/www
> 
> It always as for the password and I want to set it up to run as a cron job.
> 
>

Can someone comfirm this: I always used to put "-e ssh" in the command
line, but it seems unnecessary -- I guess rsync defaults (or
falls-back?) to using ssh.

I believe the classic recipe is to use ssh PubkeyAuthentication with a
no-passphrase key.

There must be lots of good writeups for this recipe. I searched on
  rsync cron pubkey no passphrase
and got this as top hit
  http://troy.jdmz.net/rsync/index.html
Perhaps others will provide favorite links to similar recipes.

A complication of the general theme (which can be added afterwards) is
to use a unique key for for each remote host, and use the
client-specific configuration (~/.ssh/config) to specify which key for
which host. Then I don't feel quite so exposed having no passphrase for
those keys.

Ask for clarification of details or concepts if it doesn't make sense.

Regards,
..jim


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to