I've setup a Linux Red Hat server and would like to use it by referring to its hostname instead of the static IP.
ssh firstname.lastname@example.org, instead of
but I get a message:
ssh: Could not resolve hostname myhostname Name or service not known.
If I do a
nslookup from a windows client I get this such that it can detect the IP but I see dhcp-IP instead of my set hostname:
Server: UnKnown Address: 1903:ad:8s10::fd Name: dhcp-xx-xxx-xx-xxx.blah.di.blah Address: xx.xxx.xx.xxx
As per several other stackoverflow posts, I set the hostname in:
I made the changes and did a
dhclient -r followed by
dhclient eth0 but no luck.
/etc/hosts file looks like this:
127.0.0.1 localhost localhost.localdomain xx.xxx.xx.xxx myhostname.blah.di.blah