Networking Forums

Networking Forums > Computer Networking > Linux Networking > Why aren't host names showing up with ssh?

Reply
Thread Tools Display Modes

Why aren't host names showing up with ssh?

 
 
Tristan Miller
Guest
Posts: n/a

 
      04-11-2006, 08:25 PM
Greetings.

I have a bunch of GNU/Linux machines set up on a local network through a
peripheral router. IP addresses are assigned statically rather than by
DHCP. The router has a built-in DNS server which I've used to assign
names to the computers on the Intranet:

10.0.0.2 router.example.com
10.0.0.3 foo.example.com
10.0.0.4 bar.example.com

So far so good. When I'm on foo, I can type "ping bar", and that works, so
obviously the router is properly handling the host names.

I can also type "ssh bar" from foo to get a remote shell on bar. However,
it annoys me that when I type "who", "finger", "last", or any other
command that is supposed to list incoming connections, it lists only the
IP address (10.0.0.3), not the host name (foo or foo.example.com):

[joe@bar]$ finger joe
Login: joe Name: Joe User
Directory: /home/joe Shell: /bin/bash
On since Tue Apr 11 20:56 (BST) on pts/5 from 10.0.0.3

[joe@bar]$ last joe
joe pts/5 10.0.0.3 Tue Apr 11 20:56 still logged in

On every other system I've worked with, such commands show the host name
instead of the IP address. Is there something I haven't properly
configured here or is my router misbehaving?

Regards,
Tristan

--
_
_V.-o Tristan Miller [en,(fr,de,ia)] >< Space is limited
/ |`-' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= <> In a haiku, so it's hard
(7_\\ http://www.nothingisreal.com/ >< To finish what you
 
Reply With Quote
 
 
 
 
Dave Uhring
Guest
Posts: n/a

 
      04-11-2006, 08:40 PM
On Tue, 11 Apr 2006 21:25:38 +0100, Tristan Miller wrote:

> Greetings.
>
> I have a bunch of GNU/Linux machines set up on a local network through a
> peripheral router. IP addresses are assigned statically rather than by
> DHCP. The router has a built-in DNS server which I've used to assign
> names to the computers on the Intranet:
>
> 10.0.0.2 router.example.com
> 10.0.0.3 foo.example.com
> 10.0.0.4 bar.example.com
>
> So far so good. When I'm on foo, I can type "ping bar", and that works, so
> obviously the router is properly handling the host names.


Well, it's handling the name -> IP address resolution anyway.

> I can also type "ssh bar" from foo to get a remote shell on bar. However,
> it annoys me that when I type "who", "finger", "last", or any other
> command that is supposed to list incoming connections, it lists only the
> IP address (10.0.0.3), not the host name (foo or foo.example.com):


Because your "DNS" does not do inverse resolution, i.e., IP Address -> name

> On every other system I've worked with, such commands show the host name
> instead of the IP address. Is there something I haven't properly
> configured here or is my router misbehaving?


Fix your /etc/hosts files or configure your "DNS" to perform inverse
lookup.

 
Reply With Quote
 
Dave Uhring
Guest
Posts: n/a

 
      04-11-2006, 09:33 PM
On Tue, 11 Apr 2006 21:25:38 +0100, Tristan Miller wrote:
> Greetings.
>
> I have a bunch of GNU/Linux machines set up on a local network through a
> peripheral router. IP addresses are assigned statically rather than by
> DHCP. The router has a built-in DNS server which I've used to assign
> names to the computers on the Intranet:
>
> 10.0.0.2 router.example.com
> 10.0.0.3 foo.example.com
> 10.0.0.4 bar.example.com
>
> So far so good. When I'm on foo, I can type "ping bar", and that works, so
> obviously the router is properly handling the host names.


Well, it's handling the name -> IP address forward resolution anyway.

> I can also type "ssh bar" from foo to get a remote shell on bar. However,
> it annoys me that when I type "who", "finger", "last", or any other
> command that is supposed to list incoming connections, it lists only the
> IP address (10.0.0.3), not the host name (foo or foo.example.com):


Because your "DNS" does not do inverse resolution, i.e., IP Address -> name

> On every other system I've worked with, such commands show the host name
> instead of the IP address. Is there something I haven't properly
> configured here or is my router misbehaving?


Fix your /etc/hosts files or configure your "DNS" to perform inverse
lookup.

 
Reply With Quote
 
Tristan Miller
Guest
Posts: n/a

 
      04-11-2006, 09:43 PM
Greetings.

In article <(E-Mail Removed)>, Dave Uhring wrote:
> Because your "DNS" does not do inverse resolution, i.e., IP Address ->
> name
>
>> On every other system I've worked with, such commands show the host name
>> instead of the IP address. Is there something I haven't properly
>> configured here or is my router misbehaving?

>
> Fix your /etc/hosts files or configure your "DNS" to perform inverse
> lookup.


I don't see any setting for inverse lookup in the router's configuration
page -- I guess that feature is not supported. As you said, I could
manually specify the names in /etc/hosts, but that sort of defeats the
purpose of DNS.

Regards,
Tristan

--
_
_V.-o Tristan Miller [en,(fr,de,ia)] >< Space is limited
/ |`-' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= <> In a haiku, so it's hard
(7_\\ http://www.nothingisreal.com/ >< To finish what you
 
Reply With Quote
 
Keith Keller
Guest
Posts: n/a

 
      04-11-2006, 09:43 PM
On 2006-04-11, Tristan Miller <(E-Mail Removed)> wrote:
>
> I have a bunch of GNU/Linux machines set up on a local network through a
> peripheral router. IP addresses are assigned statically rather than by
> DHCP. The router has a built-in DNS server which I've used to assign
> names to the computers on the Intranet:
>
> 10.0.0.2 router.example.com
> 10.0.0.3 foo.example.com
> 10.0.0.4 bar.example.com
>
> So far so good. When I'm on foo, I can type "ping bar", and that works, so
> obviously the router is properly handling the host names.
>
> I can also type "ssh bar" from foo to get a remote shell on bar. However,
> it annoys me that when I type "who", "finger", "last", or any other
> command that is supposed to list incoming connections, it lists only the
> IP address (10.0.0.3), not the host name (foo or foo.example.com):


Well, the obvious question (and I hope not too obvious), does name
resolution work on bar? Just because ping bar from foo works doesn't
mean ping foo from bar works. If ping foo from bar doesn't work, I'd
suspect /etc/resolv.conf on bar. If ping foo from bar does work, then
perhaps there's something in sshd_config that is causing problems?

--keith

--
kkeller-(E-Mail Removed)
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom
see X- headers for PGP signature information

 
Reply With Quote
 
Dave Uhring
Guest
Posts: n/a

 
      04-11-2006, 09:57 PM
On Tue, 11 Apr 2006 22:43:04 +0100, Tristan Miller wrote:

> Greetings.
>
> In article <(E-Mail Removed)>, Dave Uhring wrote:
>> Because your "DNS" does not do inverse resolution, i.e., IP Address ->
>> name
>>
>>> On every other system I've worked with, such commands show the host name
>>> instead of the IP address. Is there something I haven't properly
>>> configured here or is my router misbehaving?

>>
>> Fix your /etc/hosts files or configure your "DNS" to perform inverse
>> lookup.

>
> I don't see any setting for inverse lookup in the router's configuration
> page -- I guess that feature is not supported. As you said, I could
> manually specify the names in /etc/hosts, but that sort of defeats the
> purpose of DNS.


The RFCs for DNS only require "forward" lookup. Inverse lookup is
completely optional and remember also that the router was designed for
Windose lusers who do not use protocols which work best with inverse
lookup enabled and configured.

Populate your /etc/hosts files and your login waits will also decrease by
about 30 seconds.

 
Reply With Quote
 
Jeremiah DeWitt Weiner
Guest
Posts: n/a

 
      04-12-2006, 02:54 PM
Dave Uhring <(E-Mail Removed)> wrote:
> Because your "DNS" does not do inverse resolution, i.e., IP Address -> name


That's _reverse_ resolution, not "inverse". Confusingly enough, DNS
seems to have originally included something called "inverse querying",
but going from IP to name is generally known as reverse.

--
Oh to have a lodge in some vast wilderness. Where rumors of oppression
and deceit, of unsuccessful and successful wars may never reach me
anymore.
-- William Cowper
 
Reply With Quote
 
Dave Uhring
Guest
Posts: n/a

 
      04-12-2006, 03:23 PM
On Wed, 12 Apr 2006 14:54:59 +0000, Jeremiah DeWitt Weiner wrote:

> Dave Uhring <(E-Mail Removed)> wrote:
>> Because your "DNS" does not do inverse resolution, i.e., IP Address -> name

>
> That's _reverse_ resolution, not "inverse". Confusingly enough, DNS
> seems to have originally included something called "inverse querying",
> but going from IP to name is generally known as reverse.


I suppose then that we need to change this (from BIND 9 Configuration
Reference (p38 of 39):

+-------------------------------+
|$ORIGIN|2.1.10.in-addr.arpa |
|-------+-----------------------|
|3 |IN PTR foo.example.com.|
+-------------------------------+
to

+-------------------------------+
|$ORIGIN|2.1.10.rev-addr.arpa |
|-------+-----------------------|
|3 |REV PTR foo.example.com.|
+-------------------------------+

While ISC does use the term "reverse name resolution" the title of the
chapter is: 6.3.4. Inverse Mapping in IPv4

 
Reply With Quote
 
Ken Sims
Guest
Posts: n/a

 
      04-12-2006, 05:05 PM
Hi Dave -

On Wed, 12 Apr 2006 10:23:30 -0500, Dave Uhring <(E-Mail Removed)>
wrote:

>I suppose then that we need to change this (from BIND 9 Configuration
>Reference (p38 of 39):
>
> +-------------------------------+
> |$ORIGIN|2.1.10.in-addr.arpa |
> |-------+-----------------------|
> |3 |IN PTR foo.example.com.|
> +-------------------------------+
>to
>
> +-------------------------------+
> |$ORIGIN|2.1.10.rev-addr.arpa |
> |-------+-----------------------|
> |3 |REV PTR foo.example.com.|
> +-------------------------------+


According to my BIND book, that IN stands for INternet, not INverse.

PTR (PoinTeR) is what makes it inverse/reverse.

--
Ken
http://www.kensims.net/
 
Reply With Quote
 
Dave Uhring
Guest
Posts: n/a

 
      04-12-2006, 05:24 PM
On Wed, 12 Apr 2006 10:05:47 -0700, Ken Sims wrote:

> According to my BIND book, that IN stands for INternet, not INverse.
>
> PTR (PoinTeR) is what makes it inverse/reverse.


Indeed, my mistake there. It's been a couple of years since I set up some
nameservers.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any point to full host names in /etc/hosts ? Rikishi 42 Linux Networking 52 11-12-2007 06:59 PM
Resolving host names on a moveable laptop mtford Linux Networking 5 03-20-2006 08:31 PM
DHCPD and host names gedm Linux Networking 0 06-08-2005 09:00 AM
Can Not Resolve Host names =?Utf-8?B?QXR0aWN1cyBGaW5jaA==?= Windows Networking 4 01-16-2005 10:11 PM
Can linux box have two host names / 2 ip addresses Richard TU Linux Networking 12 10-02-2004 03:58 PM



1 2 3 4 5 6 7 8 9 10 11