0

I tried to connect VS CODE with Google Colab cloud storage using the SSH key. For that, I took the following steps:

  1. Ran the code of the highest voted answer of the following link in the Google Colab editor: Is it possible to connect vscode (on a local machine) with Google Colab (the free service) runtime?

  2. After getting the port number and password, using this tutorial: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh [Steps mentioned under "Getting Started" section], I typed ssh {My email address}@0.tcp.ngrok.io:{Port Number}.

The problem occurred when I typed the password; It gives me the following error: SSH Error Message

Now, how can I resolve this?

1 Answers1

0

In your first step, the creation of ngrok tunnel for SSH connection should generate something like this:

username: root
password: wtPUPjhjkhkjhkjhadsfhkj2LcycqC
ssh root@2.tcp.ngrok.io -p 10377

The outcome might vary depending on which Python script you use on Colab to evoke the ngrok service.

Go to VS Code, open the configuration file of the Remote-SSH extension. Add the following thing into the file:

Host Colab
    HostName 2.tcp.ngrok.io
    User root
    Port 10377 

You may need to modify it according to the credential generated by ngrok.

Now following the steps below to connect yourself to the remote host via VS Code:

  1. Go to VS Code's Remote Explorer.
  2. Right click the entry Colab (you just created it in the configuration file)
  3. Choose the way you prefer to connect your local machine to the host.
  4. Click Continue in the first onscreen dialog window.
  5. When you are prompted to enter password, use the one created by ngrok.

Then you're all set.

Li-Pin Juan
  • 1,156
  • 1
  • 13
  • 22