Mac Agent Not Working - Can't Connect

13»

Posts

  • PaulOliver.1067PaulOliver.1067 USMember

    I was able to fix this by:

    1. Looking at the Visual Studio logs to see the error
    2. Fiddling with my /etc/ssh/ssshd_config file on my Mac
    3. Restarting sshd on my Mac to get it working

    My Setup

    • Parallels and Windows 10
    • Mac OS Sierra
    • Visual Studio 2015
    • Xamarin, Latest on stable channel on both Mac and on Windows 10
    • Using zsh on Mac (oh-my-zsh)
    • I can connect to my Mac using ssh from the windows machine: ssh [email protected] works.

    The error in my Visual Studio log (C:\Users\MYUSERNAME\AppData\Local\Xamarin\Logs\14.0)

    Xamarin.VisualStudio.Remote.State.DisconnectedState|Error|0|Invalid credentials. Please try again.
    Xamarin.Messaging.Ssh.Exceptions.MessagingAuthenticationException: Could not authenticate the user MYUSERNAME with the provided credentials ---> Renci.SshNet.Common.SshAuthenticationException: No suitable authentication method found to complete authentication (publickey,password).
       at Renci.SshNet.ClientAuthentication.Authenticate(IConnectionInfoInternal connectionInfo, ISession session)
    

    I had to update my /etc/ssh/sshd_config file on my Mac to make it work

    This option was turned off: ChallengeRepsonseAuthentication no

    I turned it back on:

    # Change to no disable s/key passwords
    ChallengeResponseAuthentication yes
    

    And that fixed it.

    My /etc/ssh/sshd_config file settings

    If you're interested, these are all the settings in my /etc/ssh/sshd_config without comments:

    LogLevel DEBUG3
    AuthorizedKeysFile  .ssh/authorized_keys
    PasswordAuthentication yes
    ChallengeResponseAuthentication yes
    UsePAM yes
    ClientAliveInterval 20 
    ClientAliveCountMax 5 
    UseDNS no
    AcceptEnv LANG LC_*
    Subsystem   sftp    /usr/libexec/sftp-server
    
  • DavidMontalvoDavidMontalvo MXMember

    In my case. I found the following in VS Log:

    Xamarin.Messaging.Ssh.MessagingService|Information|0|Starting connection to Mac 10.36.101.162...
    Xamarin.Messaging.Ssh.XmaCommands|Warning|0|Integrity check failed between deployed content and local copy. Server path: /Users/dave/Library/Caches/Xamarin/XMA/Broker/4.5.0.486, Local path: C:\Users\davimont\AppData\Local\Temp\Xamarin\XMA\Broker\Broker.4.5.0.486.md5
    Xamarin.Messaging.Ssh.MessagingService|Information|0|Installing Broker 4.5.0.486...
    Xamarin.Messaging.Ssh.XmaCommands|Warning|0|Integrity check failed between deployed content and local copy. Server path: /Users/dave/Library/Caches/Xamarin/XMA/Broker/4.5.0.486, Local path: C:\Users\davimont\AppData\Local\Temp\Xamarin\XMA\Broker\Broker.4.5.0.486.md5
    Xamarin.Messaging.Ssh.MessagingFileManager+UploadFileLogger|Information|0|Uploading Broker 4.5.0.486 (160/1538 KB) 10%...
    Xamarin.Messaging.Ssh.MessagingFileManager+UploadFileLogger|Information|0|Uploading Broker 4.5.0.486 (320/1538 KB) 20%...
    Xamarin.Messaging.Ssh.MessagingFileManager+UploadFileLogger|Information|0|Uploading Broker 4.5.0.486 (464/1538 KB) 30%...
    Xamarin.Messaging.Ssh.MessagingFileManager+UploadFileLogger|Information|0|Uploading Broker 4.5.0.486 (624/1538 KB) 40%...
    Xamarin.Messaging.Ssh.MessagingFileManager+UploadFileLogger|Information|0|Uploading Broker 4.5.0.486 (784/1538 KB) 50%...
    Xamarin.Messaging.Ssh.MessagingFileManager+UploadFileLogger|Information|0|Uploading Broker 4.5.0.486 (928/1538 KB) 60%...
    Xamarin.Messaging.Ssh.MessagingFileManager+UploadFileLogger|Information|0|Uploading Broker 4.5.0.486 (1088/1538 KB) 70%...
    Xamarin.Messaging.Ssh.MessagingFileManager+UploadFileLogger|Information|0|Uploading Broker 4.5.0.486 (1232/1538 KB) 80%...
    Xamarin.Messaging.Ssh.MessagingFileManager+UploadFileLogger|Information|0|Uploading Broker 4.5.0.486 (1392/1538 KB) 90%...
    Xamarin.Messaging.Ssh.MessagingFileManager+UploadFileLogger|Information|0|Uploaded Broker 4.5.0.486 100%
    Xamarin.Messaging.Ssh.XmaCommands|Warning|0|Integrity check failed between deployed content and local copy. Server path: /Users/dave/Library/Caches/Xamarin/XMA/Broker/4.5.0.486, Local path: C:\Users\davimont\AppData\Local\Temp\Xamarin\XMA\Broker\Broker.4.5.0.486.md5
    Xamarin.Messaging.Ssh.MessagingService|Error|0|Unable to install the Broker
    Xamarin.VisualStudio.Remote.State.DisconnectedState|Error|0|Couldn't connect to 10.36.101.162. Please try again

    Deleting the XAM folder in both the MAC and the PC in the Local/Temp/Xamarin folder did the work.
    =)

  • oliveiravitor3oliveiravitor3 BRMember ✭✭
    edited July 2017

    Don't forget to install XCode and Android Studio (or Visual Studio for Mac).

    Both are necessary to run on iOS.

  • kurtmatiskurtmatis USMember

    I've actually repaired Xamarin's stuff and sent it back to them for some time. In 2014 they shipped the first versions of Visual Studio support, including project templates. At that time even their"Hello World" template was broken. I couldn't direct potential customers to their examples, since most were broken. I had to fix a set that I could demonstrate to customers. It's sad that this state of affairs continues - I just had similar problems about the build server on VS2017. The lack of quality control is allowing things like React Native to gain traction. I know many folks who have switched to it, sadly.

  • DavidStrickland0DavidStrickland0 USMember ✭✭✭

    So just to add another thing to try if you run into this issue. That I didnt see documented anywhere else. In a 64-bit version of Windows Vista, Windows Server 2008, Windows 7, or Windows Server 2008 R2 you need https://support.microsoft.com/en-us/help/2588507/error-messages-when-a-32-bit-application-has-the-largeaddressaware-opt to get the connection from VS to Mac working.

  • JoeJohnstonJoeJohnston USMember ✭✭
    edited October 2017

    If you updated xcode make sure you start xcode up on the mac and accept the terms. Yes ... AGAIN

    *BecauseItsALittleBiyach

  • @JoeJohnston said:
    If you updated xcode make sure you start xcode up on the mac and accept the terms. Yes ... AGAIN

    *BecauseItsALittleBiyach

    +1 for starting up xcode again

  • eraera AUMember

    Using the IP address worked for me. Also I had to be logged in my Mac using the same credentials as in VS.

  • vishal_thakkarvishal_thakkar Member ✭✭

    error while connectin to mac .
    mac in installed on VMWare .

13»
Sign In or Register to comment.