From 09bdc7caaee4473b4f1087b1e58058b3ea383655 Mon Sep 17 00:00:00 2001 From: John Hood Date: Sun, 8 May 2016 22:59:30 -0400 Subject: [PATCH] Enforce SHELL=/bin/sh for more reliable SSH proxy command. --- scripts/mosh.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/mosh.pl b/scripts/mosh.pl index ac8183d..375906b 100755 --- a/scripts/mosh.pl +++ b/scripts/mosh.pl @@ -369,6 +369,9 @@ if ( $pid == 0 ) { # child die "Cannot exec $server: $!\n"; } if ( $use_remote_ip eq 'proxy' ) { + # Non-standard shells and broken shrc files cause the ssh + # proxy to break mysteriously. + $ENV{ 'SHELL' } = '/bin/sh'; my $quoted_proxy_command = shell_quote( $0, "--family=$family" ); push @sshopts, ( '-S', 'none', '-o', "ProxyCommand=$quoted_proxy_command --fake-proxy -- %h %p" ); }