Normally, if I want to point to a Bonjour-capable host on my local network, I can use its local network hostname,
hostname.local, as in:
$ ssh firstname.lastname@example.org
Unfortunately, this doesn't work for all programs. I get DNS lookup errors when I try this notation in Cyberduck, for example.
So I tried the usual ways of looking up hostnames so I could just type in its IP address. First try, thanks to muscle memory was
$ whois raspberrypi.local % IANA WHOIS server % for more information on IANA, visit http://www.iana.org % This query returned 0 objects. % % You queried for raspberrypi.local but this server does not have % any data for raspberrypi.local.
Duh. Of course this of course didn't work because the Internet has no idea who my local machine is. I tried some more:
$ nslookup raspberrypi.local Server: 18.104.22.168 Address: 22.214.171.124#53 ** server can't find raspberrypi.local: NXDOMAIN host -a raspberrypi.local Trying "raspberrypi.local" Host raspberrypi.local not found: 4(NOTIMP)
Oops. That's also asking the Internet. How about…
$ host -t NS raspberrypi.local Host raspberrypi.local not found: 3(NXDOMAIN)
Still no luck. Help me out folks, how can I lookup the IP address of another machine on my local network if all I know is its Bonjour hostname?
Update: Apparently, Cyberduck gives the misleading DNS lookup error if you accidentally type the username into the Server field, as in
email@example.com instead of
raspberrypi.local. 🤦🏻♂️ It's still a valid question, but not a great premise.