Cameron Simpson
2011-Oct-19 07:40 UTC
why does rsync translate user@host into '$RSYNC_RSH -l user host'?
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, -- Cameron Simpson <cs at zip.com.au> DoD#743 http://www.cskk.ezoshosting.com/cs/ If NT is the answer, you didn't understand the question. - Peter Blake
Kevin Korb
2011-Oct-19 15:35 UTC
why does rsync translate user@host into '$RSYNC_RSH -l user host'?
-----BEGIN PGP SIGNED MESSAGE----- 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. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6e7lUACgkQVKC1jlbQAQdrQgCdHMFHsrheg5h3ycobenoIMHA7 7+sAoOpsUSaO5y24/3qrLPgBRsyrs/qd =Ev0/ -----END PGP SIGNATURE-----