[CentOS] rsync question

Thu Sep 10 19:36:05 UTC 2015
Robert Moskowitz <rgm at htt-consult.com>


On 09/10/2015 02:23 PM, C Linus Hicks wrote:
>   On 09/10/15, Robert Moskowitz wrote:
> ---------------- Quoted text ------------------------
> I just tried the following:
>
> rsync -ah --stats "ssh -p613 -l root" 192.168.192.2:/root/samba.PDC/
> /home/rgm/data/htt/httnet/homebase/new/root/
>
> And it failed with:
>
> Unexpected remote arg: 192.168.192.2:/root/samba.PDC/
> rsync error: syntax or usage error (code 1) at main.c(1330) [sender=3.1.1]
>
> I tried again with:
>
> rsync -ah --stats -e "ssh -p613 -l root" 192.168.192.2:/root/samba.PDC/
> /home/rgm/data/htt/httnet/homebase/new/root/
>
> and it worked. This is what I read from the manpage, that "-e" is
> needed for the ssh command.
>
> --------------------- End Quote ----------------------------------
>
> Try this:
> rsync -ah --stats 192.168.192.2:/root/samba.PDC/
> /home/rgm/data/htt/httnet/homebase/new/root/

And how is it determined that the ssh login is to be as root, not my userid?