Machine name set to new-host-X instead of the name set in Preferences My machine name is set shiny in System Preferences/Sharing/Computer Name.

From another machine on the network, I can only use shiny.local to refer to this machine. In the past, I used only shiny.

In a terminal, I have new-host-7 instead of the machine name.

I don't know if this is relevant, but the computers are connected to an internet box, on which a DHCP server is activated. I assigned a static IP address to the Mac. The internet box can see the name I gave to the Mac.

Is there something I can do to refer to the Mac as shiny on the network ?
Try using sudo scutil --set HostName shiny and sudo scutil --set LocalHostName shiny then close your shell (Terminal window) and open a new one.