diff --git a/bin/shell/osh.pl b/bin/shell/osh.pl index df64a7d..28cd6cc 100755 --- a/bin/shell/osh.pl +++ b/bin/shell/osh.pl @@ -1611,7 +1611,7 @@ else { push @proxyCommand, '-o', "ConnectTimeout=$timeout" if $timeout; # Quote arguments that contain spaces and build the command string - my $proxyCommandStr = join(' ', map { /\s/ ? "'$_'" : $_ } @proxyCommand); + my $proxyCommandStr = join(' ', map { quotemeta } @proxyCommand); push @command, '-o', "ProxyCommand=$proxyCommandStr"; osh_debug("ProxyCommand: $proxyCommandStr");