ssh can't resolve hostnames thru WINS

Gert Doering gert at
Sat Feb 16 00:32:52 EST 2002


On Fri, Feb 15, 2002 at 01:49:01PM -0200, Denis Vlasenko wrote:
> I found that openssh use this snippet to convert hostname to ip:
> if((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0)
>     fatal("%s: %.100s: %s", __progname, host,
>         gai_strerror(gaierr));

This is the "best" and *current* way to do hostname to IP resolution.

> and it fails for me exactly in this if() when I say "ssh <wins_name>".
> OTOH, ping uses code similar to
> struct hostent *hp;
> hp = gethostbyname(hostname);

This is "the old way", which can't do IPv6 (and has other limitations).

> and this works for WINS names.

Sounds like a microsoft weirdness to me... 

USENET is *not* the non-clickable part of WWW!
Gert Doering - Munich, Germany                             gert at
fax: +49-89-35655025                        gert.doering at

More information about the openssh-unix-dev mailing list