posted 15 years ago
There's something wrong with the target machine - evidently it's not listening for ssh clients (sshd stopped?). The purpose of /etc/hosts is to translate a hostname into an IP address. If you're giving the IP address directly, you skip that step.
There's nothing magic about /etc/hosts, and it's perfectly legal to assign multiple hostnames to a single IP address in /etc/hosts. I do it all the time, since that allows me to target services rather than machines - for example cvs.mousetech.com, svn.mousetech.com www.mousetech.com all might be the same IP. But if SVN outgrows the www box, I can move it to a different machine, change the hosts files and the clients will mostly never know the difference.
Although I should mention that /etc/hosts is only the first entry in my resolver chain and that DNS handles most of the non-critical stuff. /etc/hosts works best when only the hosts that you must be able to resolve even if DNS is unavailable are in it. That's because DNS server all machines, but you have to manually keep each box's /etc/hosts file up to date.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.