I'm observing some "interesting" behavior on my Mac -- I have a Linux box running on my LAN with IPv6 configured, and I when I try to "ssh -6" from my Mac to that box, the mDNS hostname resolution fails -- unless I do a "ping6" first. After that, ssh is able to resolve the mDNS hostname for a few minutes, and then I have to ping6 it again.
Here's an example of what I mean:
Jeremys-Mac-Pro:~ jaf$ ssh -6 root@TopGalaxy.LeftRack.local. ssh: Could not resolve hostname topgalaxy.leftrack.local.: nodename nor servname provided, or not known Jeremys-Mac-Pro:~ jaf$ ping6 TopGalaxy.LeftRack.local. PING6(56=40+8+8 bytes) fe80::1426:42a4:b4f0:9dde%en1 --> fe80::21c:abff:fe00:55e4%en1 16 bytes from fe80::21c:abff:fe00:55e4%en1, icmp_seq=0 hlim=64 time=1.056 ms 16 bytes from fe80::21c:abff:fe00:55e4%en1, icmp_seq=1 hlim=64 time=0.266 ms ^C --- topgalaxy.leftrack.local ping6 statistics --- 2 packets transmitted, 2 packets received, 0.0% packet loss round-trip min/avg/max/std-dev = 0.266/0.661/1.056/0.395 ms Jeremys-Mac-Pro:~ jaf$ ssh -6 root@TopGalaxy.LeftRack.local. Last login: Mon Apr 29 05:20:05 2019 from fe80::10bc:71a1:9dac:faff%eth0 root@g2:~#
From what I can tell using Wireshark, the initial "ssh -6" command does not cause any mDNS queries to be sent out by the Mac, but the second (post-ping6) invocation of "ssh -6" does.
Is this a bug in MacOS/X's Bonjour implementation (or MacOS/X's build of ssh), or is there some other explanation for why ssh won't resolve the mDNS hostname without invoking ping6 first?
FWIW I can also use telnet to provoke ssh into working (i.e. even though the Linux box isn't running a telnet server and therefore the telnet connection attempt fails, telnet is able to resolve the mDNS hostname, and after that, ssh can as well -- for a couple of minutes)