how to change Hostname and change DNS Via SSH?

maya2020

New member
Joined
Jun 13, 2022
Messages
1
hello
I do not have access to the direct admin control panel.
I only have access to SSH.
how to change Hostname and change DNS Via SSH?
I want to change the main domain and half server
Thanks
 
Why don't you have access to the DA control panel? Because changing half the server via SSH will be a hard thing to do probably.

How to change the hostname in the OS is depending which OS. Most likely with the hostnamectl command. Check your /etc/hosts and /etc/hostname files afterwards, probably reboot is needed.

To change hostname in DA your can use this command:
/usr/local/directadmin/scripts/hostname.sh
 
Back
Top