[BALU] rsync: --password-file doesn't work

Daniel Hallmark daniel.hallmark at gmail.com
Wed Feb 7 23:32:21 CST 2007


Per the man page documentation:

       --password-file
              This option allows you to provide  a  password  in  a  file  for
              accessing  a  remote rsync server. Note that this option is only
              useful when accessing a rsync server using the built  in  trans-
              port,  not  when using a remote shell as the transport. The file
              must not be world readable. It should contain just the  password
              as a single line.

My guess is that your linux box is not actually running the rsync
server on TCP port 873.  Instead you're simply trying to automate a
manual rsync process via an SSH remote shell.  The --password-file
option isn't used when you're running rsync across a shell.  To do
what you're trying to do your linux box needs to be running rsyncd.

I tested this between my iMac and my linux laptop and got the same
results (prompted for a password) when not running rsyncd on the
laptop.  I don't have rsyncd installed or I'd fire it up and give it a
try, but I think that may solve your problem.

Daniel



On 2/7/07, Eric Volker <evolker at gmail.com> wrote:
> I'm trying to automate rsync on a Mac OS X machine to sync some files
> from a Linux file server. From a shell, I can type
>
> rsync <ip address>:/path/to/remote/folder /path/to/local/folder
>
> I can then enter the password, and then everything syncs up just
> dandy. However, when I try to automate authentication by using the
> following:
>
> rsync --password-file=/Users/<username>/rsync-pass <ip address>:/path/
> to/remote/folder /path/to/local/folder
>
> I *still* get prompted for the freaking password. Per man rsync, the
> only thing in the rsync-pass folder is the password as a single line.
> What could I possibly be missing?
>
> Thanks,
>
> Eric Volker



More information about the Members mailing list