I changed my hostname on my Ubuntu (12.04) computer but my CentOS computer still connects to it using the old hostname. How can I make it so that I can type:
ssh new_hostname
instead of :
ssh old_hostname
and it will connect to my computer still?
I edited the /etc/hostname
file and the /etc/hosts
file and I also restarted my computer and in the terminal it shows my hostname, but ssh still only connects with the old hostname.
/etc/hostname
?~/.ssh/config
, you can have aliases defined there.