File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 74
74
my $help =0;
75
75
my $work_mem_per_connection_percent =150;
76
76
my @Ssh_opts =(' BatchMode=yes' );
77
+ my $ssh_user =undef ;
77
78
my $ssd =0;
78
79
my $nocolor =0;
79
80
my $skip_ssh =0;
96
97
" help" => \$help ,
97
98
" wmp=i" => \$work_mem_per_connection_percent ,
98
99
" sshopt=s" => \@Ssh_opts ,
100
+ " sshuser=s" => \$ssh_user ,
99
101
" ssd" => \$ssd ,
100
102
" nocolor" => \$nocolor ,
101
103
" skip-ssh" => \$skip_ssh ,
@@ -234,7 +236,11 @@ sub usage {
234
236
} elsif ($host =~ / ^::1$ / ) {
235
237
$os_cmd_prefix =' ' ;
236
238
} 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
+ }
238
244
} else {
239
245
die (" Invalid host '$host '" );
240
246
}
You can’t perform that action at this time.
0 commit comments