why does rsync translate user at host into '$RSYNC_RSH -l user host'?

Kevin Korb kmk at sanitarium.net
Wed Oct 19 09:35:50 MDT 2011

Hash: SHA1

Because it is an even bigger joy to be able to type 'ssh newhost' and
have it just work even though you can't talk to newhost.  You can do
that by properly configuring ssh in ~/.ssh/config with something like this:

Host accessiblehost
  User cameron

Host newhost
  ProxyCommand ssh accessiblehost -W %h:%p
  User root

On 10/19/11 03:40, Cameron Simpson wrote:
> Why does rsync believe it knows more about the use of the token to the left
> of the colon than the program which will be used as the remote connection?
> I have a script called sshto with accepts targets like this:
>   host1!host2!host3
> and constructs the requisite ssh ProxyCommand options to do a multihop
> ssh to host3 to run a command. Very useful if connecting to firewalled
> nonroutable hosts or to take a particular route through a network.
> It is a particular joy to run:
>   rsync -e sshto foo host1!host2!host3:bah
> and have things "just work".
> So here I am attempting to deposit a kit onto a newly installed
> nonroutable machine:
>   sshto cameron at accessiblehost!root at newhost blah
> which works just fine. But if I call rsync with this:
>   rsync -e sshto -aH kit/ cameron at accessiblehost!root at newhost:kit/
> what it invokes is:
>   sshto -l cameron at accessiblehost!root newhost rsync .....
> Since sshto is my own tool I can probably have it cope with this
> mangling of my target string into "-l foo bah", and undo it.
> But WHY does rsync believe this is desirable, or even necessary?
> Cheers,

- -- 
	Kevin Korb			Phone:    (407) 252-6853
	Systems Administrator		Internet:
	FutureQuest, Inc.		Kevin at FutureQuest.net  (work)
	Orlando, Florida		kmk at sanitarium.net (personal)
	Web page:			http://www.sanitarium.net/
	PGP public key available on web site.
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/


More information about the rsync mailing list