Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'd like to know if it's possible on a debian machine to automatically setup the hosts file of every other computer on the network.

I'd like to be able to connect to the machine using a host name instead of the IP (ssh user@hostname instead of ssh user@192.168.1.10), but I don't want to change manually all the hosts files on the other computers on the network. Is there a way to do it automatically ?

Thanks !

share|improve this question

2 Answers 2

up vote 4 down vote accepted

You can setup a local DNS server and configure all your machines to use it. This way you don't need to edit hosts file on every machine whenever you add a new one or change its IP.

For automatically managing the configuration files, you can try configuration management software like puppet.

share|improve this answer
    
Will do, thanks ! –  Ping Jan 16 '13 at 12:18

You better to configure a local DNS server and a DHCP server.

Using DHCP server you can even supply the NameServer name each client should use.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.