[CentOS] SSH hostname login

Sat Aug 13 18:41:04 UTC 2005
Scot L. Harris <webid at cfl.rr.com>

On Sat, 2005-08-13 at 14:22, Kai wrote:
> Correct this is a private network, works perfect Thank you Alexander.
> 
> The server receives the ip from a router and therefore I'd like to use a 
> host name, since ip can change when rebooting router or server.
> 
> That would be the next issue since the 192.168.0.100/200 did not do it.
> 
> Do I have to enter all the ip addresses given from router to solve this 
> or is there a one line solution?

Unless your router assigns the same IP address each time you should
consider using static addressing.  Some routers are able to assign
reserved IP addresses to devices based on the MAC address of the network
interface in the server.

Without that capability assign static IP addresses then the entries in
your /etc/hosts file will always be correct.

For a small home network maintaining /etc/hosts files is not a problem.