Thursday, April 14, 2011

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

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

From stackoverflow
  • Use nslookup

    nslookup 208.77.188.166 
    ...
    Non-authoritative answer:
    166.188.77.208.in-addr.arpa     name = www.example.com.
    
  • 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)

  • 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.

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.