File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 7474my $help =0;
7575my $work_mem_per_connection_percent =150;
7676my @Ssh_opts =(' BatchMode=yes' );
77+ my $ssh_user =undef ;
7778my $ssd =0;
7879my $nocolor =0;
7980my $skip_ssh =0;
9697 " help" => \$help ,
9798 " wmp=i" => \$work_mem_per_connection_percent ,
9899 " sshopt=s" => \@Ssh_opts ,
100+ " sshuser=s" => \$ssh_user ,
99101 " ssd" => \$ssd ,
100102 " nocolor" => \$nocolor ,
101103 " skip-ssh" => \$skip_ssh ,
@@ -234,7 +236,11 @@ sub usage {
234236 } elsif ($host =~ / ^::1$ / ) {
235237 $os_cmd_prefix =' ' ;
236238 } elsif ($host =~ / ^[a-zA-Z0-9._-]+$ / ) {
237- $os_cmd_prefix =" ssh $ssh_opts $host " ;
239+ if (defined ($ssh_user )) {
240+ $os_cmd_prefix =" ssh $ssh_opts $ssh_user \@ $host " ;
241+ } else {
242+ $os_cmd_prefix =" ssh $ssh_opts $host " ;
243+ }
238244 } else {
239245 die (" Invalid host '$host '" );
240246 }
You can’t perform that action at this time.
0 commit comments