I ssh to my ubuntu server and run sudo netstat -a -p and I get this:

tcp        0      0 ip-172-31-25-123.us:ssh mailDOTjjtoursDOTcom:54531  ESTABLISHED 1516/sshd: ubuntu [

And when I use my other ssh client, it shows another jjtoursDOTcom in there.

I use putty and bitvise.

Why does it show that domain name? (I replaced dots . with DOT in domain names)


netstat does a reverse DNS lookup to display a hostname instead of an IP. You can disable reverse DNS lookup with the -n option.

Try this:

$ sudo netstat -anp
| improve this answer | |
  • By any chance do you know how does netstat guesses the name there? – Mac A. Mar 12 '19 at 17:23
  • As i said, it does a reverse DNS lookup. The problem is, that multiple domain names can point to a single IP. So it is possible, that you get an hostname which you do not expect. Hope that explains it a bit. – Samuel Philipp Mar 12 '19 at 17:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.