I'm using CentOS 5. How do I change the hostname of the machine so I can ssh to it from other boxes by a short hostname? I've tried "hostname puppet", changing "/etc/sysconfig/network" and "sysctl kernel.hostname=puppet". I'd like to be able to do this without making changes to any hostfiles.
Thanks.
You either have to setup a local DNS server or you will have to change hostfiles. The changes you did will work, only to be identified in the local system and not from other systems.
no need to reboot
1 /etc/hosts
2 /etc/sysconfig/network
3 /bin/hostname
$su -c service syslog restart
logout
login