Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#466350: clusterssh: cssh is not good for looking hostname in .ssh/config

4 views
Skip to first unread message

Josip Rodin

unread,
Jan 4, 2010, 8:40:02 PM1/4/10
to
retitle 466350 cssh does not support wildcard .ssh/config Host entries
thanks

Hi,

The proper way to fix this would be to use a method of matching on
%ssh_hostnames keys that isn't just an exact match, but also one that
checks if the keys match a wildcard pattern. Assuming the ssh config
globs are simple, a Perl Cookbook solution should be applicable:

sub glob2pat {
my $globstr = shift;
my %patmap = (
'*' => '.*',
'?' => '.',
'[' => '[',
']' => ']',
);
$globstr =~ s{(.)} { $patmap{$1} || "\Q$1" }ge;
return '^' . $globstr . '$';
}

Or use something like Text::Glob (libtext-glob-perl).

--
2. That which causes joy or happiness.

--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

0 new messages