I can't connect to Mac with Xamarin Mac Agent from Visual Studio 2015

前端 未结 15 1899
一生所求
一生所求 2020-12-08 15:07

I\'m continuing my adventure with Xamarin.

I\'m developing an Xamarin Forms application with a Portable Class Libraries (PCL).

I have compiled and debugged my

15条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-08 15:43

    Update Visual Studion on Mac and:
    1) Delete on Mac - all files in .ssh (rm *)
    2) Delete on Mac the folder .ssh
    3) On Windows, generate your ssh key and transfer to MAC - for that Open Windows PowerShell and execute the follow commands:
    [generate the key]
    PS>ssh-keygen -t rsa -b 4096

    [define the remote host variable]
    PS>$REMOTEHOST="name_of_mac_user@ip_mac_machine"

    [send the key to mac machine]
    PS>scp "$env:USERPROFILE\.ssh\id_rsa.pub" "${REMOTEHOST}:~/tmp.pub"

    [copy the key tmb.pub to authorized_keys file and set the permissions]
    PS>ssh "$REMOTEHOST" "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat ~/tmp.pub >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys && rm -f ~/tmp.pub"

    4) check on mac .ssh folder if the authorized_keys file is correct:
    tail ./authorized_keys

    5) check the permission for authorized_keys (-rw-------)
    ls -al ./authorized_keys

提交回复
热议问题