Subject: | place '--' in ssh command after host name breaks rsync |
The Change "place '--' in ssh command after host name" in 0.53_03 breaks
rsync and possibly scp. The following piece of code -
use Net::OpenSSH;
$Net::OpenSSH::debug ||= 8;
# Init control
my $ssh = Net::OpenSSH->new('test_remote_host');
# Rsync _get_
$ssh->rsync_get(
{
checksum => 1,
archive => 1,
delete => 1,
},
'/path/to/remote/file',
'/path/to/local/file'
);
will cause an rsync call of
rsync -e ssh -q -o User=mithun -- --blocking-io -q --checksum --
archive --delete -- test_remote_host:/path/to/remote/file
/path/to/local/file
The extra '--' in the transport args causes trouble if not quoted. i.e,
rsync -e "ssh -q -o User=mithun --" --blocking-io -q --checksum --
archive --delete -- test_remote_host:/path/to/remote/file
/path/to/local/file
I'm guessing _rsync_quote might need some extra logic to provide a fully
quoted transport arg.
Thanks,
Mithun