how to find host name from IP with out login to the host

Viewed 533090

i need to find the host name of a UNIX host whose IP is known with out login to that UNIX host

11 Answers

Use nslookup

nslookup 208.77.188.166 
...
Non-authoritative answer:
166.188.77.208.in-addr.arpa     name = www.example.com.

You can do a reverse DNS lookup with host, too. Just give it the IP address as an argument:

$ host 192.168.0.10
server10 has address 192.168.0.10

The other answers here are correct - use reverse DNS lookups. If you want to do it via a scripting language (Python, Perl) you could use the gethostbyaddr API.

Related