Hi,
I'm trying to change the hostname permanently in my VPS Essential following these instructions:
1) I edited `/etc/cloud/cloud.cfg` and added:
preserve_hostname: true
manage_etc_hosts: false
2) I edited `/etc/hostname` with "mydomain"
3) I edited `/etc/hosts` and have the following:
127.0.0.1 localhost
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
127.0.1.1 mydomain.com mydomain
Then when I reboot the VPS I check again the `/etc/hosts` file and had the following:
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
127.0.1.1 mydomain.com mydomain
127.0.1.1 vps-XXXXXXXX.vps.ovh.net.novalocal vps-XXXXXXXX
Why is always appending the `127.0.1.1 vps-XXXXXXXX.vps.ovh.net.novalocal vps-XXXXXXXX` line in every reboot if I changed the `/etc/cloud/cloud.cfg` correctly?
Hostname is not changed after rebooting
Related questions
- Installing Operating System from custom image on OVH VPS ( CentOS 8 Tutorial)
9626
11.01.2020 21:11
- Remote access to MySQL database
4967
16.01.2018 15:29
- Nameserver for my vps
4667
07.08.2018 11:35
- Upgrading your VPS - need to extend your disk? The Easy way!
4648
14.02.2019 16:06
- Redirect domain to vps
4494
03.01.2018 22:32
- IPv6 Configuration
4278
30.07.2018 12:50
- Change server location
4033
06.11.2020 10:16
- Not able to connect to my server at all
3620
17.09.2020 19:56
- How to OVH Firewall and VPN
3581
29.10.2019 12:16
- Test latency of EU data centers
2830
30.01.2019 20:50