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 );