On Sun, Mar 29, 2009 at 05:15:58PM +1300, Morgan Read wrote: > ssh [...] sudo rsync [...] -e 'ssh -i /home/rsync/.ssh/id_dsa' [...]
Those quotes won't survive the trip through that many programs, so you're undoubtedly ending up with rsync seeing just the "-e ssh" option, and the -i and beyond are taken as options/args to rsync itself. Your best bet is to put ssh config items into your /root/.ssh/config file. For instance: Host 192.168.1.100 User root IdentityFile /home/rsync/.ssh/id_dsa That sets those settings as the default when accessing that IP. Or give it a name and use that name instead of a hostname or IP when telling rsync what host to contact. For instance, in the local host's .ssh/config file: Host r40 Host 192.168.1.40 User rsync Then on the remote host: Host r100 Host 192.168.1.100 User root IdentityFile /home/rsync/.ssh/id_dsa Then run this (trailing slash added to avoid /path/etc/etc): ssh -t r40 sudo rsync -avzAXHn --delete-after /etc/ r100:/path/etc Your other option is to create a script that executes ssh with the option(s) you want to use and run that script via rsync's -e option. ..wayne.. -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html