What you're doing in /etc/hosts is adding the name and address of other systems that this system can get to by name (with ssh and the like). You do not want to add anything to the localhost line (never ever, just leave it be). So, if your other system is named foo.bar, your hosts file would look like this:
127.0.0.1 localhost
123.456.789.1 foo.bar foo
That way you can refer to foo.bar as simply foo; e.g., ssh foo, or with the full name, ssh foo.bar
|