SSH DNS resolution order
Hi,
I'm not sure if this is a bug and if it is one I'm not sure to which package it belongs.
The DNS resultion order of an SSH connection has a quite bad performance at the moment. When I enable the log-queries option of dnsmasq I see these entries showing up when I open a SSH connection to a host (mysshhost) in the same domain (mydomain.tld):
So when I execute:
ssh mysshhost
I get these log entries:
Jan 16 15:34:09 workstation1 dnsmasq[13845]: query[AAAA] mysshhost.
Jan 16 15:34:09 workstation1 dnsmasq[13845]: forwarded mysshhost.
Jan 16 15:34:09 workstation1 dnsmasq[13845]: reply mysshhost.
Jan 16 15:34:09 workstation1 dnsmasq[13845]: query[AAAA] mysshhost from 127.0.0.1
Jan 16 15:34:09 workstation1 dnsmasq[13845]: forwarded mysshhost to 192.168.1.3
Jan 16 15:34:09 workstation1 dnsmasq[13845]: forwarded mysshhost to 192.168.1.2
Jan 16 15:34:09 workstation1 dnsmasq[13845]: forwarded mysshhost to 192.168.1.3
Jan 16 15:34:18 workstation1 dnsmasq[13845]: query[AAAA] mysshhost from 127.0.0.1
Jan 16 15:34:18 workstation1 dnsmasq[13845]: forwarded mysshhost to 192.168.1.3
Jan 16 15:34:18 workstation1 dnsmasq[13845]: forwarded mysshhost to 192.168.1.2
Jan 16 15:34:27 workstation1 dnsmasq[13845]: query[A] mysshhost.
Jan 16 15:34:27 workstation1 dnsmasq[13845]: forwarded mysshhost.
Jan 16 15:34:27 workstation1 dnsmasq[13845]: forwarded mysshhost.
Jan 16 15:34:27 workstation1 dnsmasq[13845]: reply mysshhost.
As you can see, the first query is a query for an AAAA record for mysshhost.
In my opinion it would make more sense to lookup the IP address in this order:
AAAA record for mysshhost.
A record for mysshhost.
AAAA record for mysshhost
A record for mysshhost
I already have two workarounds for my .ssh/config file:
The first one is to disable IPv6:
AddressFamily inet
The other one is to specify the full hostname for mysshhost:
Host mysshhost
HostName mysshhost.
User myuser
I'm looking forward to your input :)
Cheers,
Alex
-- Update: --
I also got a lot of unanswered PTR queries in the logs:
query[PTR] 134.9.168.
To fix this I have to use this option:
GSSAPIAuthentic
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Thomas Krüger
- Solved:
- Last query:
- Last reply: