"Karl J. Runge" <[EMAIL PROTECTED]> writes:
>But now it certainly seems like a name resolution problem.
>The ssh process for some reason cannot resolve "vanzandt" to an IP
>address.
...
>Just curious, if on voyager you remove the vanzandt.mv.com line
>and put in:
>
>    192.168.0.1    foobar
>
>does "ssh -v foobar" at least show it got the 192.168.0.1? (similar to
>your successful ssh -v coming the other way)

This works fine:
  voyager:/etc# ping foobar
  PING foobar (192.168.0.1): 56 data bytes
  64 bytes from 192.168.0.1: icmp_seq=0 ttl=255 time=1.4 ms
  64 bytes from 192.168.0.1: icmp_seq=1 ttl=255 time=1.1 ms

>Also might want to look at /etc/host.conf and see that you have
>the line "order hosts,bind" which means check /etc/hosts first..

I have just "order hosts" now, since I'm not running named.

>You can run strace and/or ltrace on both ssh and ping (or telnet)
>and try to see how the name resolution is proceeding differently.
>(you may have to do this as root if the binary is SUID). You would
>run it like "strace <cmd>" and capture stderr to a file.

Thank you!  I had tried strace without learning anything, but I had
forgotten about ltrace.

>Very strange ping resolves name and ssh doesn't:
>they should be using the same library (gethostbyname(3)).

Actually, no!  I had to add some entries in the ltrace configuration
file, but eventually found...

ping uses gethostbyname successfully:
  voyager:/tmp$ grep vanzandt logping
  ...
  13445 gethostbyname("vanzandt")                   = 0x401279c4

However, ssh is using getaddrinfo instead, and failing:
  getservbyname("ssh", "tcp")                       = 0x4020bc1c
  snprintf("22", 32, "%d", 22)                      = 2
  getaddrinfo("vanzandt.mv.com", "22", 0xbffff2bc, 0xbfffee94) = -2
  gai_strerror(-2)                                  = "Name or service not known"

Now, if I can find the sources for this version of ssh, I should be
able to run it under a debugger and figure out what's going on.  

Thanks again!

        - Jim Van Zandt

**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to