Can't remotely connect with hostname, but it works with IP

1

1

I am tying to connect to Windows 10 machine from a macOS Sierra using Microsoft Remote Desktop. The Windows machine is behind a switch. Both machines run on a local network.

I can connect to it using IP, but I can't using hostname. I've got the hostname from 192.168.1.1 router DHCP table.

Error when trying to connect with hostname:

We couldn't connect to the remote PC because the PC can't be found. Please provide the fully-qualified name or the IP address of the remote PC, and then try again. Error code: 0x104.

What could be the reason and what should I do?

sanjihan

Posted 2018-03-09T13:02:18.810

Reputation: 571

are you sure the hostname resolves on the Mac? Perhaps it isn't set to use your router for dns. – Garr Godfrey – 2018-03-09T15:07:21.567

Under Prefernces->Network->Advanced->DNS I have DNS server address 192.168.1.1. Shouldn't that do it? – sanjihan – 2018-03-12T08:40:23.253

probably not. Your router probably understand internet DNS but not on your LAN. Mac and Windows use different protocols – Garr Godfrey – 2018-03-13T21:00:19.737

Answers

1

Delete any custom DNS server(s) under System Preferences » Network » Advanced » DNS and use the local network's DNS to get it to resolve via hostname.

Charlie Schliesser

Posted 2018-03-09T13:02:18.810

Reputation: 244

This was my exact problem. You prevented (additional) hours of heads banging against walls. Thanks!! – Lanny Bose – 2019-01-11T12:08:17.050

0

All you need to do is flush the DNS:

  1. Open CMD and type ipconfig /flushdns and press enter.
  2. Wait to when it has been done!
  3. Write down ipconfig /registerdns and press enter.

Wait 10-15 minutes and try again to connect not using the IP.

user1097069

Posted 2018-03-09T13:02:18.810

Reputation: 1