As I have come to understand, SSH always goes through the process of reverse DNS lookups whether you are connecting to user@example.com
or a local server calleduser@192.168.0.56
. I do not know, however, why the SSH command performs a reverse dns lookup for IP addresses regardless. Like, I had to change my DNS server configuration on my Pi to Google's open DNS so that my client machine wouldn't take so long to actually handshake with the server through DNS lookup with my ISPs DNS servers. Even when my Pi is on my local network.
tl;dr - Why does SSH do reverse DNS lookup for local IP addresses?
ssh(1)
doesn't do any reverse DNS lookups,sshd(8)
does. (3)sshd(8)
does reverse DNS lookups because that's what its authors made it do. :) You can disable this behaviour if you want. (4) Google DNS (or any other public DNS) won't answer queries for non-routable addresses, such as192.168.x.y
. You need a local properly configured DNS server if you want reverse resolution on your local net. (5) You already posted this question. Flagging. – Satō Katsura Jun 25 '16 at 17:24