abdy hussein wrote:Since I know the host Ip address is there a way I can use it to get its hostname?.
That doesn't really make any sense.
If you know the IP address, you can just use that to connect.
If you want to use the host name instead of the IP (a better approach, when feasible), then either have your network admins put an entry in whatever naming service you're using, or else add an entry to your
/etc/hosts or
C:/Windows/System32/drivers/etc/hosts. (If you do the latter, then you'll of course have to update it each time the IP address changes.)
Note also that the hostname that maps to an IP address doesn't have to be the same as what the computer thinks its own name is (i.e., what you get as a result of the
hostname command on that computer).