made hostname lookup work without HOSTNAME environment va...

...riable and added option to not execute a command when connecting to host