0

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?

  • So what is the question ? Do you want to know how to change your DNS ? What is the distribution you are running on your Pi ? – Dieter G Jun 25 '16 at 15:35
  • (1) There is no such thing as "reverse DNS lookups for domains", reverse lookups only make sense for IPs. (2) 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 as 192.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
  • Sorry, this is a different question from my other one and the others do not answer – user4191887 Jun 25 '16 at 17:57

1 Answers1

1

You can set the option

UseDNS no

in the file /etc/ssh/sshd_config on your server to tell sshd(8) not to do DNS lookups.

Satō Katsura
  • 13,368
  • 2
  • 31
  • 50
VGR
  • 11