Pairing to Mac from VS 2019 Error

Darin Casier 1 Reputation point
2021-10-10T18:17:04.403+00:00

Hi,

I'm having an issue trying to pair my Mac to my Windows machine in Visual Studio 2019 so I can build a Xamarin iOS project. As of note, this was working fine a few months ago, but I'm guessing something's changed between then and now that's seemingly preventing it.

Machines in question:
Windows machine:
Windows 11 (22000.194 co_release) - From the Windows Insider Program, on on the Release Preview channel.
Visual Studio 2019 - 16.11.4

Mac
MacOS Big Sur 11.6
Visual Studio for Mac - 8.10.10 (build 8)
XCode 13.0

For one thing, the Mac used to show up automatically when I went to pair it. Now, when I try to manually add it (using the machine's IP address), I get an error:
"Couldn't retrieve SSH Fingerprint. Please ensure the host is reachable and Remove Login is Enabled."
139252-screenshot-2021-10-10-134734.png

I can't seem to put in a Username or Password either into this box....it won't accept focus at all. I can only cancel.

I do indeed have Remote Login turned on on the Mac, and I am able to SSH into it just fine from the Windows machine using Windows Terminal. I also have the firewall turned off on both machines, as to rule out blocked ports (although that might still be happening?)

I also dug into the logs, and found this of interest when I try to pair:

Xamarin.Messaging.Integration.State.ServerStateContext Information: 0 : Server State transition from DisconnectedState to ConfiguringState on 192.168.2.66 (192.168.2.66): 10-10-2021 17:52:20Z  
    DateTime=2021-10-10T17:52:20.9206939Z: 10-10-2021 17:52:20Z  
Xamarin.Messaging.Integration.State.ServerStateContext Information: 0 : Checking host configuration for connecting to '192.168.2.66'...: 10-10-2021 17:52:20Z  
    DateTime=2021-10-10T17:52:20.9678568Z: 10-10-2021 17:52:20Z  
Xamarin.Messaging.Integration.State.ServerStateContext Information: 0 : !Checking host configuration for connecting to '192.168.2.66'...: 10-10-2021 17:52:20Z  
    DateTime=2021-10-10T17:52:20.9678568Z: 10-10-2021 17:52:20Z  
Xamarin.Messaging.Integration.State.ServerStateContext Information: 0 : Checking SSH configuration...: 10-10-2021 17:52:20Z  
    DateTime=2021-10-10T17:52:20.9828543Z: 10-10-2021 17:52:20Z  
Xamarin.Messaging.Integration.State.ServerStateContext Information: 0 : !Checking SSH configuration...: 10-10-2021 17:52:20Z  
    DateTime=2021-10-10T17:52:20.9828543Z: 10-10-2021 17:52:20Z  
Xamarin.Messaging.Integration.Models.CredentialsModel Error: 0 : Could not retrieve fingerprint.  
System.OperationCanceledException: Could not retrieve fingerprint. ---> System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions  
   at Renci.SshNet.Abstractions.SocketAbstraction.ConnectCore(Socket socket, IPEndPoint remoteEndpoint, TimeSpan connectTimeout, Boolean ownsSocket)  
   at Renci.SshNet.Connection.ConnectorBase.SocketConnect(String host, Int32 port, TimeSpan timeout)  
   at Renci.SshNet.Connection.DirectConnector.Connect(IConnectionInfo connectionInfo)  
   at Renci.SshNet.Session.Connect()  
   at Renci.SshNet.BaseClient.CreateAndConnectSession()  
   at Renci.SshNet.BaseClient.Connect()  
   at Xamarin.Messaging.Ssh.SshFingerprintRetriever.<>c__DisplayClass1_0.<RetrieveFingerprintAsync>b__1() in D:\a\_work\1\s\src\Xamarin.Messaging.Ssh\SshFingerprintRetriever.cs:line 56  
   --- End of inner exception stack trace ---  
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  
   at Xamarin.Messaging.Ssh.SshFingerprintRetriever.<RetrieveFingerprintAsync>d__0.MoveNext() in D:\a\_work\1\s\src\Xamarin.Messaging.Ssh\SshFingerprintRetriever.cs:line 28  
--- End of stack trace from previous location where exception was thrown ---  
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  
   at Xamarin.Messaging.Integration.FingerprintRetriever.<RetrieveFingerprintAsync>d__6.MoveNext() in D:\a\_work\1\s\src\Xamarin.Messaging.Integration\FingerprintRetriever.cs:line 23  
--- End of stack trace from previous location where exception was thrown ---  
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  
   at Xamarin.Messaging.Integration.Models.CredentialsModel.<LoadFingerprintAsync>d__90.MoveNext() in D:\a\_work\1\s\src\Xamarin.Messaging.Integration\Models\CredentialsModel.cs:line 302: 10-10-2021 17:52:21Z  

Its clear from that callstack that its having an issue opening the connection, but the only thing I can think of is something else is using the port? But if that was the case, why does SSH work through Windows Terminal to the same machine?

Any help would be appreciated. Thanks!!

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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.