ssh not resolving host names on HP-UX 11i

Tom Orban TORBAN at do.usbr.gov
Fri Dec 5 13:02:48 EST 2003


Actually it really never was answered, but here's how I fixed (worked
around) it.  At first I thought installing patch PHNE_27796 (libnss_dns
DNS backend patch) had fixed it.  It didn't.  It just flip-flopped the
problem.  Prior to installing that patch, ssh would never go to DNS no
matter what was in nsswitch.conf.  It appeared to only look in
/etc/hosts.  After installing the patch, ssh would now only go to DNS,
no matter what was in nsswitch.conf.  So if you had a test box that was
only in your local hosts file, you were SOL no matter what you had in
nsswitch.conf.  Having ssh only go to DNS was better than the converse,
but it still was a problem.

The problem ultimately appears to be with the getaddrinfo that is
supplied with HP-UX 11i.  In the ssh configure, it tries to see if
there's a getaddrinfo available.  If so, it doesn't use the one in the
openbsd-compat directory (file is fake-rfc2553.[ch]).  (this is what
11.00 automatically uses).  Since 11i does have a getaddrinfo, it tries
to use that, but it appears to be broken.  So I just added the following
lines to configure (around line 3782)

        cat >>confdefs.h <<\EOF
#define BROKEN_GETADDRINFO 1
EOF

There's a whole bunch of these constructs there, I just cut-n-pasted,
ran the new configure, and presto, problem solved.

-Tom

>>> Tim Rice <tim at multitalents.net> 12/04/03 06:30PM >>>

I can't remember if this was answered or not. (cleaning out old mail)

This might help.
	http://bugzilla.mindrot.org/show_bug.cgi?id=748 

On Tue, 28 Oct 2003, Tom Orban wrote:

> 
> I posted a message about this problem late last week, never heard
> anything back, so I have to assume other folks did get a working ssh
> (3.7.1p2) binary built on HP-UX 11i. Just to refresh, my ssh package
> that I built on HP-UX 11i works fine, except that the ssh binary
doesn't
> seem to go to DNS to resolve host names.  So the only way I can ssh
to
> other machines is to put their host entries in my /etc/hosts file,
or
> type their IP address instead of the hostname on the command line. 
> Since that's a really unsustainable workaround, I've grabbed the
3.7.1p2
> ssh binary that I built on an hp-ux 11.00 box and use it with the
rest
> of the package that I build on 11i.  Ugly, but it seems to work.
[snip]

-- 
Tim Rice				Multitalents	(707) 887-1469
tim at multitalents.net 





More information about the openssh-unix-dev mailing list