Chrome Remote Desktop access to Headless Ubuntu Server 16.04 Machine

Solution 1:

  1. Install Chrome Remote Desktop.
  2. Get an auth code by going to https://accounts.google.com/o/oauth2/auth?scope=https://www.googleapis.com/auth/chromoting%20https://www.googleapis.com/auth/googletalk%20https://www.googleapis.com/auth/userinfo.email&redirect_uri=https://talkgadget.google.com/talkgadget/blank&response_type=code&client_id=440925447803-avn2sj1kc099s0r7v62je5s339mu0am1.apps.googleusercontent.com&access_type=offline&approval_prompt=force (note the client ID is from chromium) and once allowed (on the blank page), the authorization will be the code= parameter of the URL.
  3. On the headless machine run:

    $ /opt/google/chrome-remote-desktop/start-host --code="MY_AUTH_CODE" \
        --redirect-url=https://talkgadget.google.com/talkgadget/blank \
        --name="MY_REMOTE_NAME"
    
  4. Pick a PIN and use it to connect later.

Solution 2:

Go to https://remotedesktop.google.com/headless/ and follow the instructions. This walks you through the steps you previously had to do manually from Wernight's answer.