Why is my host name wrong at the Terminal prompt when connected to a public WiFi network?
Type in Terminal:

scutil --get HostName


If there's no HostName available, what you see is probably coming from the DNS or DHCP server.  

Set your HostName with:

sudo scutil --set HostName 'yourHostName'


That should do it.