1

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 !

Lukmo
  • 113
  • 3

2 Answers2

4

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.

Khaled
  • 36,533
  • 8
  • 72
  • 99
2

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.

Suku
  • 2,036
  • 13
  • 15