Couldn't retrieve SSH Fingerprint.

DurgaPrasadMailapalliDurgaPrasadMailapalli ✭✭BYUniversity ✭✭

Hi,
We are getting the following error "Couldn't retrieve SSH Fingerprint, PLease ensure the Mac is reachable and Remote Login is enabled." while doing Xamarin MAC agent process from Windows to MAC.
Details:
1. Both Windows & MAC are having same xamarin version
2. Both are in same network
*From Windows to MAC ping reaching fine.
MAC to Windows we are getting timeout error.

Please help us, anyone knows this.

Thanks in advance.

Posts

  • BrendanZagaeskiBrendanZagaeski Xamurai USForum Administrator, Xamarin Team Xamurai

    If you haven't run through the "Troubleshooting Remote Login" steps on the troubleshooting guide yet, I would recommend trying those steps as precisely as possible as the next step. In the end, you will hopefully have resolved this issue or end up with a set of "verbose logs" that can be studied directly or submitted (e.g., on Stack Overflow or on a bug report) for further investigation.

    MAC to Windows we are getting timeout error.

    This is also interesting, but it might not be too big of an issue, depending on whether another SSH client can connect successfully from Windows to Mac (step 8 of the troubleshooting guide).

  • DurgaPrasadMailapalliDurgaPrasadMailapalli ✭✭ BYUniversity ✭✭
    edited June 2016

    Hi,

    As per your suggestion we tried troubleshooting steps..
    ssh localhost and ssh [email protected] both ways we are getting same error.
    "ssh_exchange_identification: Connection closed by remote host"
    we identified that it falls in step 12 in troubleshooting guide.

    *MAC to Windows ping is reaching fine.

    Please find the log....

    for command ssh localhost following log:
    Jun 17 15:15:04 Dorababu com.apple.xpc.launchd[1] (com.openssh.sshd.863107AB-E145-42B8-A9C6-C172B374CC1B): Service instances do not support events yet.
    Jun 17 15:15:04 Dorababu.local sshd[4031]: fatal: /var/empty must be owned by root and not group or world-writable.
    Jun 17 15:15:04 Dorababu com.apple.xpc.launchd[1] (com.openssh.sshd.863107AB-E145-42B8-A9C6-C172B374CC1B[4031]): Service exited with abnormal code: 255

    for command ssh [email protected] following log:
    Jun 17 15:16:45 Dorababu com.apple.xpc.launchd[1] (com.openssh.sshd.8950BB5E-7F50-4E97-9804-3E36C17D071B): Service instances do not support events yet.
    Jun 17 15:16:45 Dorababu.local sshd[4038]: fatal: /var/empty must be owned by root and not group or world-writable.
    Jun 17 15:16:45 Dorababu com.apple.xpc.launchd[1] (com.openssh.sshd.8950BB5E-7F50-4E97-9804-3E36C17D071B[4038]): Service exited with abnormal code: 255
    Jun 17 15:16:53 Dorababu.local Console[4042]: Failed to connect (_consoleX) outlet from (NSApplication) to (ConsoleX): missing setter or instance variable
    Jun 17 15:16:54 Dorababu.local coreservicesd[118]: SFLEntryBase::ListHasChanged mach_msg returned 10000004d
    Jun 17 15:16:55 Dorababu com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): The _DirtyJetsamMemoryLimit key is not available on this platform.

    please suggest us what to do next action?
    Thanks in advance.

  • BrendanZagaeskiBrendanZagaeski Xamurai USForum Administrator, Xamarin Team Xamurai

    Jun 17 15:15:04 Dorababu.local sshd[4031]: fatal: /var/empty must be owned by root and not group or world-writable.

    It looks like the permissions of your /var/empty folder are somehow incorrect. On my system, that folder has mode 755.

    That is, if I run the following command in a Terminal.app command prompt:

    stat -f '%A %N' /var/empty
    

    I get:

    755 /var/empty

    If you get a different mode for that folder, you could try setting the mode to match my system by running the following command in a Terminal.app command prompt (with the usual cautions about being careful when modifying system files):

    sudo chmod 755 /var/empty
    
  • DurgaPrasadMailapalliDurgaPrasadMailapalli ✭✭ BYUniversity ✭✭

    We tried the same command "stat -f '%A %N' /var/empty" and we got same result "755 /var/empty".

  • BrendanZagaeskiBrendanZagaeski Xamurai USForum Administrator, Xamarin Team Xamurai

    Hmm. One other thing to check is that the owner is root. For the following command in Terminal.app:

    ls -ld /private/var/empty
    

    I get:

    drwxr-xr-x 2 root sys 68 Feb 11 21:12 /private/var/empty

    If changing the owner to root isn't the problem either, then the issue might be that the permissions or ownership of the parent /private/var directory are incorrect. For comparison, on my system:

    stat -f '%A %N' /private/var
    

    755 /private/var

    And:

    ls -ld /private/var
    

    drwxr-xr-x 26 root wheel 884 Jun 1 01:40 /private/var

    (The permissions of the /private folder are the same as the permissions of the /private/var/ directory on my system.)

    Beyond that, this issue heads a bit outside my area of expertise, so if none of those ideas help, the best next step might be to ask a question on a more general discussion forum such as http://serverfault.com/ about getting ssh localhost to work on OS X (be sure to include the latest error messages from your sshd log file in that question).

  • DurgaPrasadMailapalliDurgaPrasadMailapalli ✭✭ BYUniversity ✭✭

    ***After changing the owner its working fine...
    really it is great help. Thank you so much.

  • NBCruzNBCruz ✭✭ USMember ✭✭

    Going thru similar troubleshooting process right now. Connected fine to the Mac via VS last week. Opened up VS today and am getting this same error msg.

    Ping from Windows to Mac was not working and found out that 'Stealth Mode' on the firewall was enabled, so I turned that off. **Would be useful/helpful to update your guide (https://developer.xamarin.com/guides/ios/getting_started/installation/windows/connecting-to-mac/troubleshooting/#Troubleshooting_Remote_Login) on Step 7 to mention to check this.

    Now I'm on Step 8 of the troubleshooting process. What SSH client does Xamarin/Visual Studio use to connect and where is the program .exe located?

  • NBCruzNBCruz ✭✭ USMember ✭✭

    Checked out the log and got this:

    Xamarin.VisualStudio.IOS.MacServer Error: 0 : [2016-08-22 13:29:40.3396] Couldn't retrieve fingerprint.
    System.OperationCanceledException: Couldn't retrieve fingerprint. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.1.76:22
    at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
    at Renci.SshNet.Session.SocketConnect(String host, Int32 port)
    at Renci.SshNet.Session.Connect()
    at Renci.SshNet.BaseClient.Connect()
    at Xamarin.Messaging.Client.Ssh.SshFingerprintRetriever.<>c__DisplayClass2_0.b__1()
    --- 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.Client.Ssh.SshFingerprintRetriever.d__1.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Xamarin.VisualStudio.IOS.Messaging.FingerprintRetriever.d__2.MoveNext() in C:\Users\builder\data\lanes\3345\2e397405\source\XamarinVS\src\Core\VisualStudio.IOS\Messaging\FingerprintRetriever.cs:line 20
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Xamarin.VisualStudio.IOS.MacServer.<>c__DisplayClass52_0.<b__0>d.MoveNext() in C:\Users\builder\data\lanes\3345\2e397405\source\XamarinVS\src\Core\VisualStudio.IOS\Messaging\MacServer.cs:line 338
    Xamarin.VisualStudio.IOS.MacServer Error: 0 : [2016-08-22 14:35:10.8344] Couldn't retrieve fingerprint.
    System.OperationCanceledException: Couldn't retrieve fingerprint. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.1.76:22
    at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
    at Renci.SshNet.Session.SocketConnect(String host, Int32 port)
    at Renci.SshNet.Session.Connect()
    at Renci.SshNet.BaseClient.Connect()
    at Xamarin.Messaging.Client.Ssh.SshFingerprintRetriever.<>c__DisplayClass2_0.b__1()
    --- End of inner exception stack trace ---

    If I turn off the firewall on the Mac, it connects. The firewall on Windows machine is on with outbound port 22 allowed at the Private and Domain scope.

    The Mac is running OS X El Capitan with the lates Xamarin Community Studio and on Windows I have Visual Studio 2015 Update 3, Xamarin 4.1.0.530 and Xamarin.iOS 9.8.0.323

    Is there something else going on with the Mac firewall? I have 'Stealth Mode' on the firewall turned off and checked the "Automatically allow signed software to receive incoming connections" box.

  • BrendanZagaeskiBrendanZagaeski Xamurai USForum Administrator, Xamarin Team Xamurai
    edited August 2016

    where is the program .exe located

    Xamarin for Visual Studio currently uses the SSH.NET SSH library. There is no SSH standalone executable client included with Xamarin. For the purposes of step 8, you can use any Windows SSH client, such as the one packaged in Git for Windows (or you can use any standalone SSH client you like on any other computer on your network, as long as it isn't the Mac build host itself).

    I'm on Step 8 of the troubleshooting process

    Did step 8 fail or succeed? If it failed, see steps 10 and 11.

  • alaskanroguealaskanrogue ✭✭✭ USMember ✭✭✭
    edited August 2018

    Inside my network, I have no issues connecting to my development Mac using VS2017 for Xamarin iOS development. I am on the road. I have setup port forwarding on my network firewall of port 22 for both TCP and UDP to the Mac. But when I try to pair, VS says it can't retrieve a SSH fingerprint. If I "portqry" the port, it says that is filtered, not listening. The Mac's firewall is off normally and I have tested with both my firewall on and off. To the Mac, the only thing that I think is different is the IP address of the firewall is trying to make a connection, not my normal address when I am inside. But I don't think I ever made that designation on the Mac.

    Output reports...

    Checking host configuration for connecting to 'common.thoughts.net'...
    Starting disconnection from common.thoughts.net...
    The connection to 'common.thoughts.net' has been finished
    Host 'common.thoughts.net' couldn't be configured because the user authentication has been cancelled

    I didn't cancel anything myself.

    Ideas?

Sign In or Register to comment.