Quote proxycommand in case mosh lives in a directory with a bad name

(per Anders Kaseorg)
This commit is contained in:
Keith Winstein
2012-03-21 18:10:23 -04:00
parent ec0c8c8984
commit 38b4a26f85
+2 -1
View File
@@ -200,7 +200,8 @@ if ( $pid == 0 ) { # child
push @server, '--', @command;
}
exec 'ssh', '-S', 'none', '-o', "ProxyCommand=$0 --fake-proxy -- %h %p", '-t', $userhost, '--', "$server " . shell_quote( @server );
my $quoted_self = shell_quote( $0 );
exec 'ssh', '-S', 'none', '-o', "ProxyCommand=$quoted_self --fake-proxy -- %h %p", '-t', $userhost, '--', "$server " . shell_quote( @server );
die "Cannot exec ssh: $!\n";
} else { # server
my ( $ip, $port, $key );