FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 12-24-2011, 05:23 PM
Jay Ridgley
 
Default accessing DHCP connected hosts by name vs IP

Folks,

I know that if a host is connected via a static connection and is in the
/etc/hosts file by name and IP, it may be accessed by name when using ssh and sftp.


How can I or is it possible, to do the same for a host connected via DHCP?

For example: My laptop (hostname kodiak) has the following entry in /etc/hosts:

192.168.139.7 kodiak

When connected with a cat 5 cable it can be accessed simply by ssh kodiak,
however, when connected via DHCP I must use ssh 192.168.139.38 (the assigned IP
address on my local network).


I would rather only use the hostname. Once connected with ssh it does show as
kodiak, so it is identified as expected. I just can not ssh kodiak with a
wireless connection.


Is it possible to connect wirelessly with a static IP address? If so I would
love to know how it is done.


Thanks,
Jay
--


Jay Ridgley
jridgley2@austin.rr.com
Registered Linux User ID - 9115
https://linuxcounter.net/cert/9115.png
Registered Ubuntu User ID - 23320

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-24-2011, 06:20 PM
Nils Kassube
 
Default accessing DHCP connected hosts by name vs IP

Jay Ridgley wrote:
> I know that if a host is connected via a static connection and is in
> the /etc/hosts file by name and IP, it may be accessed by name when
> using ssh and sftp.
>
> How can I or is it possible, to do the same for a host connected via
> DHCP?
>
> For example: My laptop (hostname kodiak) has the following entry in
> /etc/hosts:
>
> 192.168.139.7 kodiak
>
> When connected with a cat 5 cable it can be accessed simply by ssh
> kodiak, however, when connected via DHCP I must use ssh
> 192.168.139.38 (the assigned IP address on my local network).
>
> I would rather only use the hostname. Once connected with ssh it does
> show as kodiak, so it is identified as expected. I just can not ssh
> kodiak with a wireless connection.

Your DNS server must know the host name + IP address, otherwise it can't
work. What type of DNS server do you use? If it is dnsmasq it is rather
easy to configure.

> Is it possible to connect wirelessly with a static IP address? If so
> I would love to know how it is done.

Sure it is possible. Setup network-manager to use a static IP address
instead of DHCP for the wireless link.


Nils

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 10:08 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org