mirror of
https://github.com/duncs/clusterssh.git
synced 2025-07-03 09:53:23 +00:00
Account for multiple ssh host definitions
Account for multiple host definitions within ssh configuration file - see tracker 2888789
This commit is contained in:
parent
d604feee25
commit
b39e649ab3
2 changed files with 4 additions and 1 deletions
|
@ -433,7 +433,8 @@ sub check_ssh_hostnames {
|
|||
if ( -r $ssh_config && open( SSHCFG, "<", $ssh_config ) ) {
|
||||
while (<SSHCFG>) {
|
||||
next unless (m/^\s*host\s+([\w\.-]+)/i);
|
||||
$ssh_hostnames{$1} = 1;
|
||||
# account for multiple declarations of hosts
|
||||
$ssh_hostnames{$_} = 1 foreach (split(/\s+/, $1) );
|
||||
}
|
||||
close(SSHCFG);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue