wok-next view mosh/stuff/patches/mosh.patch @ rev 21601

updated drupal (7.26 -> 9.0.1)
author Hans-G?nter Theisgen
date Wed Jun 24 15:13:05 2020 +0100 (2020-06-24)
parents ee7238bfeb84
children
line source
1 --- a/scripts/mosh.pl
2 +++ b/scripts/mosh.pl
3 @@ -347,8 +347,10 @@
4 open(STDERR, ">&STDOUT") or die;
6 my @sshopts = ( '-n' );
7 + my @dbopts = ( );
8 if ($ssh_pty) {
9 push @sshopts, '-tt';
10 + push @dbopts, '-t';
11 }
13 my $ssh_connection = "";
14 @@ -395,8 +397,13 @@
15 # proxy to break mysteriously.
16 $ENV{ 'SHELL' } = '/bin/sh';
17 my $quoted_proxy_command = shell_quote( $0, "--family=$family" );
18 + my $host = $userhost; $host = $1 if ($userhost =~ m{@(.*)});
19 + my $ssh = join(' ', @ssh);
20 + my $port = 22; $port = $1 if ($ssh =~ m{-p *(\d+)});
21 + push @dbopts, ('-J', "$quoted_proxy_command --fake-proxy -- $host $port");
22 push @sshopts, ( '-S', 'none', '-o', "ProxyCommand=$quoted_proxy_command --fake-proxy -- %h %p" );
23 }
24 + @sshopts = @dbopts if (`@ssh -V 2>&1` =~ m{Dropbear});
25 my @exec_argv = ( @ssh, @sshopts, $userhost, '--', $ssh_connection . "$server " . shell_quote( @server ) );
26 exec @exec_argv;
27 die "Cannot exec ssh: $!\n";