pythonvisual-studio-codejupytergoogle-dl-platform

Connecting to Jupyter Instance with VSCode


I have a running Google Deep Learning VM, I set up an SSH tunnel and when I navigate to http://localhost:8080, I am connected to the running Jupyter Lab instance. Running the command sudo service jupyter status, tells me that the service is running correctly.

Now, I want to connect to the Jupyter instance with Visual Studio Code. I tried [Ctrl]+[Shift]+[P] and "Python: Specify Jupyter server URI" and entered http://localhost:8080 in the resulting prompt. However, I get an error message:

Failed to connect to remote Jupyter notebook.
Check that the Jupyter Server URI setting has a valid running server specified.
http://localhost:8080/
Error: Failed to connect to password protected server. Check that password is correct.

Unfortunately, the documentation does not say very much.

Has anybody experience with connecting VSCode to a remote server? Thank you.


Solution

  • Aparently, you have to set a password. I followed the instructions here to create a hashed password. Then I edited my jupyter_notebook_config.py file and edited the line c.NotebookApp.password = '<my_super_secret_hash>'. Eventually, I could connect with VSCode.