Connect Google Colab via Remote Desktop | Updated To v2

Story Thumbnail

Before We Start

Google Colab is mostly used to perform heavy tasks like Training TensorFlow Model, Data analysis, Machine Learning and Deep Learning. You can get an Instance with 12GB RAM and GPU for free upto 12 hours. You can use it to perform heavy tasks, and access google drive to store your data.

Now Let’s Begin

New Method:

  1. Open the Notebook in Google Colab.
  2. Create user account using appropriate code block.*
    *Don’t use username: root
  3. Paste the Chrome Remote Desktop Authentication Code in RDP code block and run it. (This will complete setup in only few minutes)
  4. Optional: Mount Google Drive for Persistent Data.

How-To:

  1. First, create a user account and add a password:
    Use useradd and adduser commands for user account creation and passwd command to change the account’s password.
  2. Create and Run the Ngrok Tunnel:
    Use the colab_ssh library for creating Ngrok Tunnel.
  3. Configure Instance:
    Install Chrome Remote Desktop Headless, Desktop Environment and other required tools like browser, terminal.
  4. SSH the Colab Instance.
  5. Visit Chrome Remote Desktop and start the process:
    Open a browser and go to http://remotedesktop.google.com/headless.
  6. Don’t Download any file; proceed directly and click to authenticate button.
  7. When you get a command, copy and paste it to the SSH terminal and complete the process by setting up a pin.
Colab Instance under Remote Devices present at Chrome Remote desktop.
Video Tutorial

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pradyumna Krishna

I am a Developer to develop AI & ML Programs. A PenTester to secure the system. An Engineer to create bots.