SSH Recursive AAAA lookup

Soulou asked:

Given a server “” at,[ipv6] with a CNAME * >
And a second server “” at[ipv6]

if staging tries to SSH to “” (with ipv6) and that this domain doesn’t have any AAAA field, SSH tries to resolve As it is included in the CNAME > so will be resolved as the ipv6 of which is completely wrong.

How could I avoid that ?

In a more concrete way, git clone on resolves as the IPv6 of so I’m unable to do anything.

I’m using a clean installation of Ubuntu 12.04.

My answer:

Remove your domain name from the search line in /etc/resolv.conf.

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.