Commit 28d983a8 authored by Olav Kvittem's avatar Olav Kvittem
Browse files

include odd ssh-ports

parent d840c067
......@@ -14,7 +14,7 @@ GetOptions(@opts) || die "usage: $0 [ -target <target host> ] [-list <mp-list.tx
open LIST, "<$list" || die "Could not open $list : $!\n";
while(<LIST>){
next if /^\s*#|^\s*$/; # comment line
($name, $uid, $dns, $ip)=split;
($name, $uid, $dns, $ip, $rude_port, $crude_port, $ssh_port)=split;
if ( ! $ip ){ # simple list of names/addresses
$ip=$name;
......@@ -22,6 +22,11 @@ while(<LIST>){
}
next if $target&& $target ne $name;
printf "ssh %s@%s '%s' \n", ${uid},${ip}, $cmd;
if ( $ssh_port){
print "ssh -p $ssh_port";
} else {
print "ssh";
}
printf " %s@%s '%s' \n", ${uid},${ip}, $cmd;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment