tags:

views:

1696

answers:

4

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

+3  A: 

Use nslookup

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

You can use traceroute command as well.

http://linux.die.net/man/8/traceroute

just use the traceroute it will show you the routing path with host names (IPs resolved)

Chathuranga Chandrasekara
+2  A: 

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
unbeknown
A: 

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.

Moshe