Rsync param parsing using --rsh broken? (was: no subject)

jim jim at thegallaghers.biz
Thu Sep 16 18:51:00 GMT 2004


On Thu Sep 16 16:48:39 GMT 2004,  Wayne Davison wrote:

>> $ rsync -v -v -v --recursive --rsh="ssh -i /home/ul081b/mpdm-keys/rsa-mpdm01mpdm at >mpdm-w2k3"  MPDM-W2K3::MPDM . 
>
>That line must have contained a space prior to the mpdm at mpdm-w2k3 part
>or it wouldn't have failed as it did.  That is specifying a
>user+hostname to ssh, and rsync always supplies the hostname, so
>obviously that conflicts.  If you want to specify an ssh user when using
>a daemon-over-ssh command, use the -l option to ssh:
>
>rsync -vrt --rsh="ssh -i /home/ul081b/mpdm-keys/rsa-mpdm01 -l mpdm" mpdm-w2k3::MPDM . 
>
>..wayne..


Wayne, 

Thanks for the reply. I disagree with your analysis, however. Here is a test with your suggestion (notice that the command not found complains about the uppercase MPDM-W2K3). Also, the logs show that the ssh connection was established, so the entire quoted param for --rsh is likely correct (it works with both the @ and the -l):

$ rsync -v -v -v --recursive --rsh="ssh -i /home/ul081b/mpdm-keys/rsa-mpdm01 -l mpdm mpdm-w2k3"  MPDM-W2K3::MPDM .
opening connection using ssh -i /home/ul081b/mpdm-keys/rsa-mpdm01 -l mpdm mpdm-w2k3 MPDM-W2K3 rsync --server --daemon .
bash: line 1: MPDM-W2K3: command not found
rsync: connection unexpectedly closed (0 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at /home/lapo/package
/tmp/rsync-2.6.2/io.c(342)
_exit_cleanup(code=12, file=/home/lapo/package/tmp/rsync-2.6.2/io.c, line=342):
about to call exit(12)


Jim


More information about the rsync mailing list