Just changing the computer name in Sharing doesn't work. if you do ssh-keygen
the older computer name still shows up.
In order to change the name of the computer, you need to do the following:
sudo scutil --set ComputerName "new-name"
sudo scutil --set LocalHostName "new-name"
sudo scutil --set HostName "new-name"