Am Sa, den 13.08.2005 schrieb Kai um 19:22:
I run CentOS 4.1 on a remote server and did a minimal installation. My problem is that I can not login using the HOSTNAME, must use the IP.
- edited the - /etc/sysconfig/network
- changed - HOSTNAME=a266
- restarted the network
Looks ok, hostname appears when logged on via IP, but can't use the HOSTNAME to log on from client.
[kai@localhost ~]$ ssh a266 ssh: a266: Name or service not known
[kai@localhost ~]$ ssh 192.168.0.101 kai@192.168.0.101's password: Last login: Sat Aug 13 17:13:09 2005 from 192.168.0.102 [kai@a266 ~]$
I can't figure out where I missed out.
kai
In /etc/hosts on host 192.168.0.102 add a line
192.168.0.101 a266.<whatever your domain part is> a266
This said when not running an own DNS. If a name server for the own domain is running, then be sure /etc/resolv.conf has the "search" entry for the domain, to be able to reach the other host by short hostname.
Alexander