Ubuntu – Chrome Remote Desktop access to Headless Ubuntu Server 16.04 Machine

16.04google-chromeremote desktopserver

I have a server running Ubuntu Server 16.04, started from stock installation with SSH server. Currently, I have full access to the machine with public key SSH access. Since the machine is running non-critical resources, but I don't have easy physical access to it, I would like a non-SSH method of remote access that doesn't rely on functional upstream port-forwarding or the safety of my local machine(s) with private keys that can access the server. This would enable me to continue to manage the system and verify that it is still operational. The most evident end-to-end solution would be to use Chrome Remote Desktop. However, this seems like it would be a bit of a challenge to get setup.

I have ssh and root access to the server. With the fewest temporarily-needed packages, how can I accomplish:

  1. Installing a minimal desktop environment for Ubuntu that is compatible with Chrome Remote Desktop and provides easy shell access (I'm fairly unconcerned about which one, but it should be appropriate for a system with ancient integrated graphics)?
  2. Installing Google Chrome and its Chrome Remote Desktop app, then configuring them to act as a host (machine to be controlled) for remote access?

Then, will the Chrome Remote Desktop auto-start correctly within the desktop environment upon system reboot?

Is this plan impossible due to some incompatibility or need for physical access?

Note that my desired access requirements preclude the use of VNC or other, more typical remote access programs. The fact that Chrome Remote Desktop 'calls home' to start connections, mediated by Google, is the feature I'm most after. I may consider alternative services in the comments, but please keep answers to the Chrome Remote Desktop method.

Best Answer

  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.