If you are connected the remote host, you can get the hostname of the remote machine by using the arp command. It will list all the hostnames with the IP address. Another way is to simply type the hostname command on the remote server to know its host name.
How to Get Hostname from IP Address - unix /linux
www.folkstalk.com > Unix
1. Click the Windows Start button, then "All Programs" and "Accessories." Right-click on "Command Prompt" and choose "Run as Administrator."
2. Type "nslookup %ipaddress%" in the black box that appears on the screen, substituting %ipaddress% with the IP address for which you want to find the hostname.
How to Find a Hostname for an IP Address - Small Business - Chron ... smallbusiness.chron.com > hostname-ip-address-47400
Print the hostname of the system The basic functionality of the hostname command is to display the name of the system on the terminal. Just type the hostname on the unix terminal and press enter to print the hostname.
Hostname Command Examples in Unix / Linux Tutorials
www.folkstalk.com > 2012/08 > hostname-command-examples-in-unix-linux
Open up a command prompt by typing "cmd" into the start menu search (Windows Vista, 7, or newer) or by opening a Run window and then running "cmd" (Windows XP). The -a option of the ping command tells it to resolve the hostname of the IP address, so it will give you the name of the networked computer.
How to get Networked Computer Name from IP Address on a LAN
www.h3xed.com > windows > how-to-get-networked-computer-name-fro...