Jupyter環境の使い方

How to access Jupyter environment

Japanese / English

Get your user name and password

Working with Nbgrader

Fetching an assignment

Note: do not copy graded cells

Validate notebook

Submitting an assignment

If things go wrong ...

  1. A modest way to reset: Select Kernel-> Restart Kernel (or Restart Kernel and Clear Output) from the top menu.
  2. The "reset all" for when nothing else works: Select File-> Hub Control Panel from the top menu. Press Stop My Server and then Start My Server.

I want to re-fetch the notebook again to start over ...

I want to work with command line (SSH), not within Jupyter (web browser)

How to set up for SSH login

Prepare an SSH key pair

Uploading public key to Jupyter server

  1. In the left pane of the Jupyterlab, choose the home directory so notebooks is shown there. Click the Upload Files icon right below the Jupyter menu to upload the public key file (id_rsa.pub or another). You will have the file id_rsa.pub under the server's home directory
  2. Select File -> New Launcher in Jupyterlab menu. Among icons listed, open Bash below Notebook
  3. Copy the following into a cell and execute it by SHIFT + Enter (change ~/notebooks/id_rsa.pub below accordingly if the file name is different)
  4. mkdir -p ~/.ssh/
    cp ~/id_rsa.pub ~/.ssh/authorized_keys
    chmod 700 ~/.ssh
    chmod 600 ~/.ssh/authorized_keys
  5. Do the following to check
  6. ls -ld ~/.ssh
    ls -l ~/.ssh/authorized_keys
    cat ~/.ssh/authorized_keys
    
  7. If you see something like this, you are all set
  8. drwx------ 2 u2xxxx u2xxxx 4096 Oct  4 22:19 /home/u2xxxx/.ssh
    -rw------- 1 u2xxxx u2xxxx 394 Oct  4 22:19 /home/u2xxxx/.ssh/authorized_keys
    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9s/2Uiy187pQvMNVwlNMRTSNFnvj9EVwOPx9/qLuiQg086zXFB2eugxTL1Pw+ViQ  ...  ... uB/TiOnA0e6KDpU2h4 
    
  9. The points to check are drwx------ and -rw------- and whether the string in the last line looks like ssh-rsa AAAAB3Nza .... If the last line looks like the following, it means the key format is wrong
  10. A key in a wrong format
  11. === BEGIN SSH2 PUBLIC KEY ===
    gakjjkgdslkjgkljkjdakjdakljdkff
    tuireuproeqiutreiurewuriouoweu0
          ...
    
    === END SSH2 PUBLIC KEY ===
    

Checking if you are able to login with SSH