Hi,

Oh, and there's another problem with this. The $ssh_hostnames hash is
built using:

        while (<SSHCFG>) {
            next unless (m/^\s*host\s+([\w\.-]+)/i);
            $ssh_hostnames{$1} = 1;                 
        }

This is broken because the Host keyword doesn't accept only a *single*
hostname, it accepts any number of them. The manual page ssh_config(5)
is actually pretty clear:

     Host    Restricts the following declarations (up to the next Host key-
             word) to be only for those hosts that match one of the patterns
             given after the keyword.  If more than one pattern is provided,
             they should be separated by whitepsace.

Interestingly, in the same paragraph it also states:

             The host is the hostname argument given on the command line
             (i.e. the name is not converted to a canonicalized host name
             before matching).

This should make it clear that cssh resolving (canonicalizing) host input
prior to passing them to ssh is not the right thing to do by default,
because then it risks breaking documented ssh functionality.

End result being - when you have something like this in ~/.ssh/config:

Host first second third
  ProxyCommand ssh zeroth nc -w 60 %h 22

...and you can't resolve any one of those three (because they are hidden
behind 'zeroth'), the new version of cssh stops working for them completely
(not just a warning).

-- 
     2. That which causes joy or happiness.



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to