This may mean your DNS lookups are broken.
Your /etc/hosts file looks fine. You want it too look like this:
But there are several legitimate variants.
Make sure you have a matching hostname in /etc/hostname .
Check /etc/resolv.conf to see if you have working name servers defined.
See if you can resolve any hostnames. Does
nslookup google.com work ?
If not, your DNS lookup is failing, either due to configuration or a network or firewall problem (possibly at a point beyond what you have control of with your server).
In my experience,
sudo will eventually ask you for you password, and grant you elevated privileges, after domain lookup times out.
Try manually adding the correct DNS name servers to /etc/resolv.conf.
In a pinch, you can use public servers. Here's what the file looks like using Google DNS servers:
/etc# cat resolv.conf