On 26 Feb 2002, Simon Wong wrote:

> The DISPLAY variable is being set to something like "lonewolf:10.0" when
> I SSH to the box.
> 
> This only works when my box (that I am SSH'd into) can resolve that name
> (via /etc/hosts) to the correct IP.
> 
> I have just tested this and if I manually set the DISPLAY variable to
> the "<IPoflonewolf>:10.0" it works fine.
> 
> So this brings me to a new question which I don't see the answer to in
> the man pages:
> 
> How do I get dhclient to update the /etc/hosts file with my DHCP
> assigned IP address??

I don't think it will help, actually.  Because the machine that needs to
know lonewolf's IP is the machine you're connecting to, which has no idea
that you've gotten that IP via DHCP, and hence can't have updated /etc/hosts
for it.

You need to work out static mappings for your IP addresses, have the
machines which receive DHCP addresses automatically modify their hostnames,
or implement reverse DNS properly.  Not sure if SSH turns it's IPs into
hostnames via RDNS, so perhaps the last option might not help - but it's
still good practice.


-- 
-----------------------------------------------------------------------
#include <disclaimer.h>
Matthew Palmer
[EMAIL PROTECTED]

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to