I have a very strange problem with my hostname on Debian 7+. I've changed the hostname on my new server but for some reason it doesn't change in wierd places. Right now I get the old hostname when I login using SSH AND all my cron emails send the emails as root@old.hostname.com./etc/hosts has the correct new hostname (new.hostname.com)/etc/sysconfig/network has the correct new hostname (new.hostname.com)hostname shows the correct new hostname (new.hostname.com)hostname -A and hostname --fqdn shows the correct new hostname (new.hostname.com)Where else can I look to see if there's a missconfiguration somewhere?This is the example welcome text when logging in using SSH:login as: rootroot@new.hostname.com's password:Linux old.hostname.com 2.6.32-042stab094.7 #1 SMP Wed Oct 22 12:43:21 MSK 2014 x86_64
Correct hostname doesn't change in entire system
debian;hostname
Powering the server off and then powering it on again forced it to update the hostname.A regular reboot would probably do it as well in most cases.