From 38b4a26f854851614e08fde7a15b056b19131435 Mon Sep 17 00:00:00 2001 From: Keith Winstein Date: Wed, 21 Mar 2012 18:10:23 -0400 Subject: [PATCH] Quote proxycommand in case mosh lives in a directory with a bad name (per Anders Kaseorg) --- scripts/mosh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/mosh b/scripts/mosh index 5669a17..f3b2994 100755 --- a/scripts/mosh +++ b/scripts/mosh @@ -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 );