$ sudo nano /private/etc/hosts

If it does not take your password, which may not vibe visible when you type it, I can only suggest that it is wrong

P