Skip to content

Running Jupyter remotely

John Pearson edited this page Sep 6, 2017 · 1 revision
  • In your .ssh/config file, add something like the following to your config for the remote machine

    LocalForward 8888 localhost:8877
    

    The first number is the port you'll use on your local machine. The second is the port it will be mapped to on the remote machine. Your numbers may vary.

  • Once you're logged into the remote machine, run

    jupyter notebook --no-browser --port=8877
    

    This will return a URL to connect to the Jupyter instance on the remote machine. This URL will include a token for security verification.

  • To connect your browser, paste the URL from the last step, but change the port number to the corresponding one on your local machine.

  • If you lose or forget the token, you can log in to the remote machine and run jupyter notebook list to get the answer.