Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I was wondering why I'm connection to a server with SSH, it does a reverse DNS lookup on the IP of the remote server.

I have found comments telling that it was for security reason, lots of tutorial showing how to disable it but no explanation.

Thank you

share|improve this question

3 Answers 3

up vote 4 down vote accepted

SSHD can be configured to block access to clients whose forward(A) and reverse(PTR) records don't map to each other.

When the connection request comes in the daemon checks the reverse record of the IP: = PTR

It can then check the forward lookup record of the host: = A

If doesn't resolve to then it can block the connection.

This is because it is easy to setup your own reverse zone and map a PTR record to whatever host name you would like, but to map the host name to the IP would require you to have access to the authoritative server for that zone. IE one more thing a hacker would have to do to gain access.

share|improve this answer
Thank you for that explanation – Martin Trigaux Nov 26 '10 at 23:23

I'm not 100% certain of the answer to this question, but I imagine it is to either:

  • Display the right title in the title bar
  • To see if there is a private key installed for this host.
share|improve this answer

Not sure about why SSH does it specifically, but if you configure a box to only allow connections from, anyone can configure a box and call it, but if you can have a forward DNS entry for that points to and a PTR for that points to then it's a much better indication that you truly are

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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