Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] How to get dhclient to update /etc/hosts? WAS X11 forwarding over SSH (with DHCP)

On Tue, 2002-02-26 at 11:28, Matthew Palmer wrote:
> 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.

Sorry - I think I am being unclear :-(

I am SSHing TO lonewolf i.e.

Remote ---SSH---> Lonewolf(DHCP) (OK - it's a laptop).

So I need lonewolf to update it's /etc/hosts when it receives the IP via
DHCP.  Then when the display is set "lonewolf:10.0" it can resolve

> 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.

The network I am on doesn't have dynamic DNS(?) so it will not register
my hostname.

I'm hoping that dhcp would be able to update the hosts file

> -- 
> -----------------------------------------------------------------------
> #include <disclaimer.h>
> Matthew Palmer
> mjp16@xxxxxxxxxxxxxxx
> -- 
> SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
> More Info: http://lists.slug.org.au/listinfo/slug
* Simon Wong *