Cannot Pair To Mac Outside Local network

Eddie Hartman 0 Reputation points
2023-04-18T21:53:31.5166667+00:00

I'm trying to set up a mac mini in a remote location so that I can pair to mac in Visual Studio 2022. Everything works fine when I'm in that location and on the local network, but when I leave and try to connect via an ip address, I get a "Couldn't resolve Mac "xxx"" error. I have forwarded ports 5900 for VNC, 22 for SSH, and 5000 and 50530 for Xamarin messaging. I can ssh and vnc into the machine from outside the local network just fine. When I connect to pair with mac, I put in the subdomain pointing to the public ip address as "xxx.xxx.com" and get the error. If I put in the ip address it also just fails "xxx.xxx.xxx.xxx". Both machines are up to date with latest versions of Visual Studio (for windows and mac) and Xamarin. What am I doing wrong? Basically, I'm trying to set up Pair to Mac for IOS development over the internet and not a local network. What extra steps are involved, what ports need forwarded, etc?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,325 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 61,731 Reputation points
    2023-04-21T20:14:58.6133333+00:00

    while the Mac needs internet access to download packages, etc the visual studio connection only needs a working SSH and the proper tools installed on the Mac.

    First I'd get the local network to work. then try internet access. the typical issue with access a Mac with SSH over the internet is the reverser dns lookup. you may need to disable this.

    1 person found this answer helpful.

  2. Matt 51 Reputation points
    2024-01-02T11:39:07.02+00:00

    I don't think the feature Pair to Mac is smart enough; which is why directions specify that it must be on a local network.

    After reviewing the traffic with Wireshark I noticed that on a local network setup the initial call was TCP, but on a remote network setup the initial call was NBNS.

    My specific issue is that ATT forced their hardware on me and I have my own router behind that. So there was a snag on the passthrough setup to my router for the forwarding to work correctly.

    Once I got passed this I realized the easiest way to get Pair to Mac working remotely (based on what I've read on it) would be to set up a tunnel on the computer connecting to the mac with Windows PowerShell:

    ssh -L <local_port>:localhost:<remote_port> username@public-ip-address

    Then log in with localhost:<local_port> in the Pair to Mac window and everything connected perfectly.

    Good luck.

    1 person found this answer helpful.

  3. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 29,381 Reputation points Microsoft Vendor
    2023-04-21T07:04:17.3166667+00:00

    Hello,

    Ensuring that both machines are on the same Local Network is the premise to pair. Please check the step7 in this Remote Login Doc.

    I have to say, it's a question in network level, and you have to solve the local area network configuration between the 2 computers.

    Best Regards,

    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.